#28567: Set Language Redirect View -> 404 if prefix_default_language=False
-------------------------------------------+------------------------
               Reporter:  George Tantiras  |          Owner:  nobody
                   Type:  Uncategorized    |         Status:  new
              Component:  Uncategorized    |        Version:  1.11
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 Using python 3.4.

 In a fresh Django 1.11 install, I configured 2 languages: English (default
 Language) and Greek.

 When I implemented the example
 [https://docs.djangoproject.com/en/dev/topics/i18n/translation/#the-set-
 language-redirect-view HTML template code] to add a change language drop
 down in admin, everything worked as expected if
 `prefix_default_language=True`

 However, the following configuration in urls.py although it works when I
 change from English to Greek, it will stay to the Greek page when I try to
 change from Greek to English:

 {{{
 clean = [
     url(r'^i18n/', include('django.conf.urls.i18n')),
 ]

 admin = i18n_patterns(
     url(r'^admin/', admin.site.urls),
     prefix_default_language=False
 )


 urlpatterns = admin + clean
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28567>
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.8ed172aeb8b167fe5875fce5ccb2adcd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to