{{{
urlpatterns += i18n_patterns('',
url(r'^imprint/$', view, name='imprint'),
)
}}}
"en" is the default language.
When running Django (for example behind a reverse proxy) a request to
''/imprint/'' with ''SCRIPT_NAME='script_prefix"'' leads to the redirect
''"/en/script_prefix/imprint/"'' instead of
''"/script_prefix/en/imprint/"''.
I've already provided a patch with test. But I'm uncertain about the test,
since the test client does not seem to call ''set_script_prefix'' (might
be thought of as a bug???)
--
Ticket URL: <https://code.djangoproject.com/ticket/21579>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/21579#comment:1>
Comment (by mrhanky@…):
Are there any reasons this didn't made it into Django so far?
--
Ticket URL: <https://code.djangoproject.com/ticket/21579#comment:2>
Comment (by timo):
No one has reviewed the patch and marked the ticket "ready for checkin".
--
Ticket URL: <https://code.djangoproject.com/ticket/21579#comment:3>
* stage: Accepted => Ready for checkin
Comment:
Patch looks okay to me. I cleaned up some trailing whitespace other flake8
issues and made a [https://github.com/django/django/pull/3065 PR] to make
sure all the tests are passing.
--
Ticket URL: <https://code.djangoproject.com/ticket/21579#comment:4>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"fe38be96c1769ee83c65246704d2ae435c8d4150"]:
{{{
#!CommitTicketReference repository=""
revision="fe38be96c1769ee83c65246704d2ae435c8d4150"
Fixed #21579 -- Made LocaleMiddleware respect script prefix.
Thanks buettgenbach at datacollect.com for the report and patch.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21579#comment:5>