diff options
Diffstat (limited to 'archaeological_files/models.py')
| -rw-r--r-- | archaeological_files/models.py | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 0e5948958..a7fa9428b 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -24,7 +24,8 @@ from django.contrib.gis.db import models  from django.core.cache import cache  from django.db.models import Q, Count, Sum  from django.db.models.signals import post_save, m2m_changed, post_delete -from django.utils.translation import ugettext_lazy as _, pgettext_lazy +from django.utils.translation import ugettext_lazy as _, pgettext_lazy, \ +    activate, deactivate  from ishtar_common.utils import cached_label_changed, get_cache, \      get_current_year @@ -198,7 +199,10 @@ class File(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter,          ),      }      for v in ALT_NAMES.values(): -        EXTRA_REQUEST_KEYS[v[0]] = v[1] +        for language_code, language_lbl in settings.LANGUAGES: +            activate(language_code) +            EXTRA_REQUEST_KEYS[unicode(v[0])] = v[1] +            deactivate()      POST_PROCESS_REQUEST = {          'towns__numero_insee__startswith': '_get_department_code', | 
