Opened 7 years ago

Last modified 7 years ago

#28556 closed Bug

resolve of i18n_patterns does not match default language paths with prefix_default_language=False — at Initial Version

Reported by: nielsole Owned by: nobody
Component: Internationalization Version: 1.11
Severity: Normal Keywords: i18n, reverse
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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 = contextrequest.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

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top