Opened 20 months ago
Last modified 19 months ago
#34455 closed Bug
i18n_patterns() not respecting prefix_default_language=False — at Version 1
Reported by: | Oussama Jarrousse | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 4.2 |
Severity: | Release blocker | Keywords: | internationalization, i18n, prefix_default_language |
Cc: | sergioisidoro, Claude Paroz, Mohit Singh Sinsniwal | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
In my django project urls.py file I have the following setup:
`
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import include
from django.urls import path
urlpatterns = []
# as an example... include the admin.site.urls
urlpatterns += i18n_patterns(
path("admin/", admin.site.urls), prefix_default_language=False
)
`
In versions Django==4.1.7 (or prior), I was able to navigating to /admin/ without having to add the language prefix.
Django==4.2.0, navigating to /admin/ will cause a HTTP 302 and only /en/admin/ works... although prefix_default_language=False is explicitly defined.
This change broke my API upon backend packages upgrade from 4.1.7 to 4.2.0