diff --git a/bitpoll/base/views.py b/bitpoll/base/views.py index 78c4dd22..be0ecefe 100644 --- a/bitpoll/base/views.py +++ b/bitpoll/base/views.py @@ -22,7 +22,7 @@ from pytz import all_timezones from bitpoll.registration.forms import RegisterForm -from bitpoll.settings import IMPRINT_URL +from bitpoll.settings import IMPRINT_URL, PRIVACY_URL from django.core import signing from django.conf import settings @@ -161,7 +161,10 @@ def problems(request): def privacy(request): - return TemplateResponse(request, 'base/privacy.html') + if PRIVACY_URL: + return redirect(PRIVACY_URL) + else: + return TemplateResponse(request, 'base/privacy.html') @login_required diff --git a/bitpoll/settings.py b/bitpoll/settings.py index 99d905a9..920d5aca 100644 --- a/bitpoll/settings.py +++ b/bitpoll/settings.py @@ -52,6 +52,7 @@ 'HOME_URL_NAME', 'IMPRINT_TEXT', 'IMPRINT_URL', + 'PRIVACY_URL', 'TIME_ZONE', 'REGISTER_ENABLED', 'MAIL_SIGNATURE', @@ -326,6 +327,9 @@
Text goes here
""" +## if the PRIVACY_URL is not empty use it as an link to the privacy policy, else use bitpoll/base/templates/base/privacy.html +PRIVACY_URL = "" + LOCALE_PATHS = (os.path.join(ROOT_DIR, 'locale'), ) LANGUAGES = ( diff --git a/bitpoll/settings_local.sample.py b/bitpoll/settings_local.sample.py index cf85a351..61c00f2e 100644 --- a/bitpoll/settings_local.sample.py +++ b/bitpoll/settings_local.sample.py @@ -79,6 +79,9 @@ #Text goes here
#""" +## if the PRIVACY_URL is not empty use it as an link to the privacy policy, else use bitpoll/base/templates/base/privacy.html +#PRIVACY_URL = "" + #LOCALE_PATHS = (os.path.join(ROOT_DIR, 'locale'), ) #LANGUAGES = ( # ('de', 'Deutsch'),