Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1214 closed defect (fixed)

django.utils.translation reads DJANGO_SETTINGS_MODULE

Reported by: ianb@… 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: UI/UX:

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 Changed 9 years ago by hugo

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.

comment:2 Changed 9 years ago by hugo

  • Resolution set to fixed
  • Status changed from new to closed

(In [1941]) fixes #1214 - django.utils.translation doesn't look at DJANGO_SETTINGS_MODULE anymore, but now uses settings.SETTINGS_MODULE instead to construct the project path.

Note: See TracTickets for help on using tickets.
Back to Top