#34455: i18n_patterns() not respecting prefix_default_language=False
-------------------------------------+-------------------------------------
     Reporter:  oussjarrousse        |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (URLs)          |                  Version:  4.2
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:
  internationalization, i18n,        |  Unreviewed
  prefix_default_language            |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by oussjarrousse:

Old description:

> 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

New description:

 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

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34455#comment:1>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701874bf7803a-183d84bc-67f6-4932-a29f-356814fc5374-000000%40eu-central-1.amazonses.com.

Reply via email to