Today I tried to run makemessages to check for updated keys in Django framework source but I got exception saying I do not have valid settings. Sure I do not have because it's not a project but Django's own code...
jarek:~/install/django/django$ django-admin.py makemessages -l pl
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/django-admin.py", line 5, in <module>
management.execute_from_command_line()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/__init__.py", line 341, in execute_from_command_line
utility.execute()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/__init__.py", line 295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/base.py", line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/base.py", line 222, in execute
output = self.handle(*args, **options)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 228, in handle
make_messages(locale, domain, verbosity, process_all, extensions)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 56, in make_messages
settings.configure(USE_I18N = True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/conf/__init__.py", line 46, in configure
if self._target != None:
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/utils/functional.py", line 269, in __getattr__
self._setup()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/conf/__init__.py", line 36, in _setup
raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
jarek:~/install/django$ LANG=C svn info
Path: .
URL: http://code.djangoproject.com/svn/django/trunk
Repository Root: http://code.djangoproject.com/svn
Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37
Revision: 9951
Node Kind: directory
Schedule: normal
Last Changed Author: mtredinnick
Last Changed Rev: 9951
Last Changed Date: 2009-03-02 07:08:02 +0100 (Mon, 02 Mar 2009)
Whoops. Looks like r9945 broke something. I'll fix it now.