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

19 lines
394 B
Python

from django.conf import settings
SETTINGS_KEYS = [
'SITE_URL',
'BASE_URL',
'STATIC_URL',
'MEDIA_URL',
'LANGUAGE_CODE',
'TIME_ZONE',
'ALLOWED_HOSTS'
]
def settings_injector(request=None):
injected_settings = {}
for setting in SETTINGS_KEYS:
injected_settings[setting] = getattr(settings, setting)
return {'django_settings': injected_settings}