Hi,

Actually the issue is that the self._reverse_dict type isn't containing any key.



Le 2016-09-14 à 20:33, Mike Dewhirst a écrit :
On 14/09/2016 11:43 PM, Etienne Robillard wrote:
Hi,

Is there a way to populate self._reverse_dict to contain a default language_code in case
the setting USE_I18N is set to False?

return self._reverse_dict.get("language_code", defaultlanguagecode)

or

try:
    languagecode = failing_routine()
except KeyError:
    languagecode = defaultlanguagecode





See: http://dpaste.com/3Q1NHXA

Regards,

Etienne


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2abde4f9-f89f-df23-b53f-9ed7fa0d8c40%40yandex.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to