Django

Code

Ticket #1214 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

django.utils.translation reads DJANGO_SETTINGS_MODULE

Reported by: ianb@colorstudy.com Assigned to: hugo
Milestone: Component: Translations
Version: Keywords:
Cc: ianb@colorstudy.com Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

01/13/06 04:37:56 changed 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.

01/13/06 04:40:11 changed by hugo

  • status changed from new to closed.
  • resolution set to fixed.

(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.


Add/Change #1214 (django.utils.translation reads DJANGO_SETTINGS_MODULE)




Change Properties
Action