diff --git a/context_processors.py b/context_processors.py index 1d6a00d6..99b93001 100644 --- a/context_processors.py +++ b/context_processors.py @@ -18,3 +18,6 @@ def hello_world(request): return { 'helloworld': 'hi Sander' } + +def warning_message(request): + return {'WARNING_MESSAGE': settings.WARNING_MESSAGE} diff --git a/rowsandall_app/settings.py b/rowsandall_app/settings.py index f4cd50c5..c76969ca 100644 --- a/rowsandall_app/settings.py +++ b/rowsandall_app/settings.py @@ -117,6 +117,7 @@ TEMPLATES = [ 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.i18n', 'context_processors.google_analytics', + 'context_processors.warning_message', ], # 'loaders': [ # 'django.template.loaders.app_directories.Loader', @@ -383,3 +384,9 @@ TWEET_ACCESS_TOKEN_SECRET = CFG['tweet_access_token_secret'] TWEET_CONSUMER_KEY = CFG['tweet_consumer_key'] TWEET_CONSUMER_SECRET = CFG['tweet_consumer_secret'] +# Environment + +try: + WARNING_MESSAGE = CFG['warning_message'] +except KeyError: + WARNING_MESSAGE = '' diff --git a/templates/basebase.html b/templates/basebase.html index ec85bb4f..deca65f2 100644 --- a/templates/basebase.html +++ b/templates/basebase.html @@ -202,6 +202,11 @@