#1214 closed defect (fixed)
django.utils.translation reads DJANGO_SETTINGS_MODULE
Reported by: | Owned by: | hugo | |
---|---|---|---|
Component: | Translations | Version: | |
Severity: | normal | Keywords: | |
Cc: | ianb@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When installing the locale files, the translation module looks in the environment for DJANGO_SETTINGS_MODULE. Instead it should read the settings.__file__
attribute, or maybe have a setting that django.conf.settings
fills in (by default) from the module name like translation currently does. Whatever it does, that kind of logic doesn't need to be in the translation module.
Change History (2)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
It can't use
settings.__file__
, because that points to the django.conf.settings module - and that's the settings driver in the django source. But the settings driver already keeps the current settings module name in settings.SETTINGS_MODDULE, so I switch the code to make use of that instead of the direct environment variable.