#28556: resolve of i18n_patterns does not match default language paths with
prefix_default_language=False
-------------------------------------+-------------------------------------
Reporter: nielsole | Owner: nobody
Type: Bug | Status: new
Component: | Version: 1.11
Internationalization |
Severity: Normal | Keywords: i18n, reverse
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I believe this to be a follow-up of #27402
### urls.py
urlpatterns += i18n_patterns(
url(r'^', include('main.urls', namespace="main")),
prefix_default_language=False)
###
Now in a custom tag I try to resolve the URL(e.g. '/login/',
'/en/login/'). This fails if the path is not prefixed(e.g. '/login/'):
### my_custom_tag
path = context['request'].path
url_parts = resolve(path) # raises 404
###
My version: 1.11.4
Sorry for the brief bug report, but my laptop is running out of battery
and I don't have a charger
--
Ticket URL: <https://code.djangoproject.com/ticket/28556>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.5fc76e90670a24ffb3fd5b47b6255728%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.