context_processors.py 792 Bytes
Newer Older
1 2
from django.conf import settings

3

4 5
def country_code(context):
    # return the value you want as a dictionnary. you may add multiple values in there.
6
    return {
7 8 9 10 11 12 13
        'COUNTRY_NAME': settings.NRO_COUNTRY_NAME,
        'COUNTRY_CODE': settings.NRO_COUNTRY_CODE,
        'DOMAIN_MAIN_URL': settings.NRO_DOMAIN_MAIN_URL,
        'DOMAIN_HELPDESK_DICT': settings.NRO_DOMAIN_HELPDESK_DICT,
        'MAP_CENTER': settings.MAP_CENTER,
        'PROV_TEAM': settings.NRO_PROV_BY_DICT,
        'SOCIAL_MEDIA_LIST': settings.NRO_PROV_SOCIAL_MEDIA_CONTACT,
14
        'VERSION': settings.SW_VERSION,
15
        'GOOGLE_MAPS_API_KEY': settings.GOOGLE_MAPS_API_KEY if hasattr(settings,"GOOGLE_MAPS_API_KEY") else None,
16
    }
17 18 19 20


def cat_instances(context):
    return {'CAT_INSTANCES': settings.CAT_INSTANCES}