1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
theorangeone.net-legacy/project/common/context.py

21 lines
401 B
Python
Raw Permalink Normal View History

from django.conf import settings
SETTINGS_KEYS = [
'SITE_URL',
'BASE_URL',
'STATIC_URL',
'MEDIA_URL',
'LANGUAGE_CODE',
'TIME_ZONE',
2016-11-24 22:02:27 +00:00
'ALLOWED_HOSTS',
'WAGTAIL_SITE_NAME'
]
2016-12-28 21:38:31 +00:00
def settings_injector(request):
django_settings = {}
for setting in SETTINGS_KEYS:
2016-12-28 21:38:31 +00:00
django_settings[setting] = getattr(settings, setting)
return {'settings': django_settings}