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 [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
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/6453984f-999c-4404-916e-31bb9c7f69d8%40googlegroups.com <https://groups.google.com/d/msgid/django-users/6453984f-999c-4404-916e-31bb9c7f69d8%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
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 [email protected].
To post to this group, send email to [email protected].
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/adb30b20-174f-26c2-e8e5-571f0e86ef26%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Reply via email to