diff --git a/docs/changelog.rst b/docs/changelog.rst
index 1f1413073..7e59e04b9 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -9,6 +9,8 @@ Upgrade steps:
* Database upgrade: ``python manage.py migrate``
* Reset workout cache: ``python manage.py clear-cache --clear-workout-cache``
+* New config option in settings.py: ``WGER_SETTINGS['TWITTER']``. Set this if
+ your instance has its own twitter account.
* Update static files (only production): ``python manage.py collectstatic``
New features:
diff --git a/wger/core/templates/mobile/template.html b/wger/core/templates/mobile/template.html
index 6ea941def..928bd8058 100644
--- a/wger/core/templates/mobile/template.html
+++ b/wger/core/templates/mobile/template.html
@@ -40,8 +40,10 @@
{% block twittercard %}
+ {% if twitter %}
-
+
+ {% endif %}
{% endblock %}
{% block title %}{% endblock %}
diff --git a/wger/core/templates/template.html b/wger/core/templates/template.html
index cacbe200c..7f208fb2c 100644
--- a/wger/core/templates/template.html
+++ b/wger/core/templates/template.html
@@ -39,8 +39,10 @@
{% block twittercard %}
+ {% if twitter %}
-
+
+ {% endif %}
{% endblock %}
diff --git a/wger/core/templates/template_features.html b/wger/core/templates/template_features.html
index bf4035012..cbbc33612 100644
--- a/wger/core/templates/template_features.html
+++ b/wger/core/templates/template_features.html
@@ -38,8 +38,10 @@
{% block twittercard %}
+ {% if twitter %}
-
+
+ {% endif %}
{% endblock %}
diff --git a/wger/settings.tpl b/wger/settings.tpl
index 1d11023a6..f3ec56677 100644
--- a/wger/settings.tpl
+++ b/wger/settings.tpl
@@ -59,3 +59,6 @@ if DEBUG:
# Sender address used for sent emails
WGER_SETTINGS['EMAIL_FROM'] = 'wger Workout Manager '
+
+# Your twitter handle, if you have one for this instance.
+#WGER_SETTINGS['TWITTER'] = ''
diff --git a/wger/settings_global.py b/wger/settings_global.py
index 5440e9ebc..515b85a46 100644
--- a/wger/settings_global.py
+++ b/wger/settings_global.py
@@ -350,5 +350,6 @@ WGER_SETTINGS = {
'USE_RECAPTCHA': False,
'REMOVE_WHITESPACE': False,
'ALLOW_REGISTRATION': True,
- 'EMAIL_FROM': 'wger Workout Manager '
+ 'EMAIL_FROM': 'wger Workout Manager ',
+ 'TWITTER': False
}
diff --git a/wger/utils/context_processor.py b/wger/utils/context_processor.py
index 542fcd12f..980e719ef 100644
--- a/wger/utils/context_processor.py
+++ b/wger/utils/context_processor.py
@@ -35,6 +35,9 @@ def processor(request):
# Application version
'version': get_version(),
+ # Twitter handle for this instance
+ 'twitter': settings.WGER_SETTINGS['TWITTER'],
+
# User language
'language': language,