Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#2323 closed defect (fixed) not working outside of django apps

Reported by: Ahmad Alhashemi Owned by: Adrian Holovaty
Component: Internationalization Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


It seems that the translation module now requires 'settings'. This makes it impossible to run outside of an application. This is waht I got when I ran 'make-messages -u' in django's root directory:

Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\django\bin\", line 3, in ?
    from django.utils.translation.trans_real import templatize
  File "C:\Python24\lib\site-packages\django\utils\translation\", line 3, in ?
    if settings.USE_I18N:
  File "C:\Python24\lib\site-packages\django\conf\", line 28, in __getattr__
  File "C:\Python24\lib\site-packages\django\conf\", line 53, in _import_settings
    raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE
EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined.

I tried changing the import line from this:
from django.utils.translation import templatize

To this:
from django.utils.translation.trans_real import templatize

But it still has to run

I took the liberty to assign it to adrian becasue he is the one who broke it :)

Change History (2)

comment:1 Changed 14 years ago by Ahmad

Please note that the second line in the traceback show my trial to fix the problem. Everything else is the same as the error you would get from trunk.

comment:2 Changed 14 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

(In [3374]) Fixed #2323 -- Made it possible to run make-messages without needing a

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