On Tuesday, July 8, 2014 4:42:45 PM UTC+2, Aymeric Augustin wrote: > > Surprisingly, the call to get_language() is in RegexURLResolver, not in > LocaleRegexURLResolver. That's at least a code smell and possibly a flaw in > the current implementation. >
Yes, I was surprised by that too when I dug through that code last time. > 1 - Shouldn't it be possible to implement this feature without > monkey-patching ? I suspect this is part of the "URL resolution / reversing > is too inflexible" theme. > 2 - Shouldn't it be possible to set the root URL resolver, returned by > get_resolver, to another class than RegexURLResolver? Maybe we could be > preserve the class of urlpatterns in ROOT_URLCONF rather than wrap it in a > RegexURLResolver. > 3 - Shouldn't all the implementation of locale-dependent URLs > (i18n_patterns) be contained in LocaleRegexURLResolver? I haven't followed > the development of the feature at the time, so please forgive me if this > has been discussed before. > Yes to all of them, I'll happily review whatever you come up with. Cheers, Florian -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/a86f926c-e118-4b8e-9a6a-ff0ad78740ce%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.