diff --git a/functions/views_help.py b/functions/views_help.py index cc2d9e4f..66066b71 100644 --- a/functions/views_help.py +++ b/functions/views_help.py @@ -2,6 +2,7 @@ import re import datetime import json +from ConfigParser import ConfigParser from django.shortcuts import get_object_or_404 from django.core.cache import cache @@ -70,7 +71,8 @@ def get_side_items(event_type, model): data = cache.get(key) if data is None: data = [] - config = settings.INI_CONFIG + config = ConfigParser() + config.read(settings.INI_CONFIG_PATH) pks = json.loads(config.get('sections', option, '[]')) if pks: qs = model.objects.language().filter(pk__in=pks).values_list('pk', 'name', 'url') diff --git a/support/d_dev/settings.py b/support/d_dev/settings.py index cf8381fa..4c1e7f95 100644 --- a/support/d_dev/settings.py +++ b/support/d_dev/settings.py @@ -3,6 +3,7 @@ import os import django from django.utils.translation import ugettext_lazy as _ +from ConfigParser import ConfigParser DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__)) @@ -506,6 +507,14 @@ CACHE_RANGE = [60, 120] DEFAULT_POPUP_COOKIE = 'expo_b_default_popup' +INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini') +INI_CONFIG = ConfigParser() +INI_CONFIG.read(INI_CONFIG_PATH) +C_CITY_CATALOG_KEY = 'conf_city_catalog' +C_COUNTRY_CATALOG_KEY = 'conf_country_catalog' +E_CITY_CATALOG_KEY = 'expo_city_catalog' +E_COUNTRY_CATALOG_KEY = 'expo_country_catalog' + try: from local import * except ImportError, e: diff --git a/support/dev/settings.py b/support/dev/settings.py index b1390ced..ff135e44 100644 --- a/support/dev/settings.py +++ b/support/dev/settings.py @@ -3,6 +3,7 @@ import os import django from django.utils.translation import ugettext_lazy as _ +from ConfigParser import ConfigParser DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__)) @@ -504,6 +505,14 @@ CACHE_RANGE = [60, 120] DEFAULT_POPUP_COOKIE = 'expo_b_default_popup' +INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini') +INI_CONFIG = ConfigParser() +INI_CONFIG.read(INI_CONFIG_PATH) +C_CITY_CATALOG_KEY = 'conf_city_catalog' +C_COUNTRY_CATALOG_KEY = 'conf_country_catalog' +E_CITY_CATALOG_KEY = 'expo_city_catalog' +E_COUNTRY_CATALOG_KEY = 'expo_country_catalog' + try: from local import * except ImportError, e: diff --git a/support/prod/settings.py b/support/prod/settings.py index b7337ba5..f5b21689 100644 --- a/support/prod/settings.py +++ b/support/prod/settings.py @@ -3,6 +3,7 @@ import os import django from django.utils.translation import ugettext_lazy as _ +from ConfigParser import ConfigParser DJANGO_ROOT = os.path.dirname(os.path.realpath(django.__file__)) @@ -503,6 +504,14 @@ CACHE_RANGE = [60, 120] DEFAULT_POPUP_COOKIE = 'expo_b_default_popup' +INI_CONFIG_PATH = os.path.join(SITE_ROOT, 'proj/config.ini') +INI_CONFIG = ConfigParser() +INI_CONFIG.read(INI_CONFIG_PATH) +C_CITY_CATALOG_KEY = 'conf_city_catalog' +C_COUNTRY_CATALOG_KEY = 'conf_country_catalog' +E_CITY_CATALOG_KEY = 'expo_city_catalog' +E_COUNTRY_CATALOG_KEY = 'expo_country_catalog' + try: from local import * except ImportError, e: diff --git a/templates/client/includes/exposition/exposition_list.html b/templates/client/includes/exposition/exposition_list.html index 4e43f3f9..3ee3eeed 100644 --- a/templates/client/includes/exposition/exposition_list.html +++ b/templates/client/includes/exposition/exposition_list.html @@ -6,9 +6,9 @@ {% include 'client/includes/banners/tops.html' %} {% else %} @@ -139,15 +141,15 @@ {% else %} {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %}