On 18/09/2016 11:07 PM, Etienne Robillard wrote:
Actually the issue is that the self._reverse_dict type isn't
containing any key.
You will need to examine class RegexURLResolver(LocaleRegexProvider) in
django/core/urlresolver.py where self._reverse_dict is declared and
populated to see where your problem might have arisen.
In that source you will see that self._reverse_dict is a dict and so
either of the suggestions below should work.
I suspect the language code you are looking for is not being properly
formatted. For example, in my settings.py I have LANGUAGE_CODE = 'en-au'
which seems to work for me so I think that is a reasonable format for it.
Le 2016-09-14 Ã 20:33, Mike Dewhirst a Ã©crit :
On 14/09/2016 11:43 PM, Etienne Robillard wrote:
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)
languagecode = failing_routine()
languagecode = defaultlanguagecode
You received this message because you are subscribed to the Google Groups "Django
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.