Opened 9 years ago
Closed 9 years ago
#26295 closed New feature (fixed)
LocaleMiddleware.is_language_prefix_patterns_used should be cached per urlconf.
Reported by: | Simon Charette | Owned by: | nobody |
---|---|---|---|
Component: | Core (URLs) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | 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
The actual behavior prevents i18n_patterns
from being used by a urlconf
different from the one defined by ROOT_URLCONF
.
The request.urlconf
attribute should be taken into account when determining whether or not i18n_patterns
is used.
For example, if you were use django-hosts to map hostnames to different set of urlconf
s you couldn't have some using i18n_patterns
and some not.
I looked at docs.djangoproject.com urlconf and figured out i18n_patterns
might not have been used for this exact reason.
Change History (4)
comment:1 by , 9 years ago
Has patch: | set |
---|---|
Patch needs improvement: | set |
Triage Stage: | Unreviewed → Accepted |
Type: | Bug → New feature |
comment:2 by , 9 years ago
Patch needs improvement: | unset |
---|
comment:3 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
PR
I guess this might be more of a new feature rather than a bug since the documentation currently says
i18n_patterns
can only be used inROOT_URLCONF
.