Django

Code

Ticket #7643 (closed: fixed)

Opened 3 months ago

Last modified 3 months ago

manage.py makemessages not working

Reported by: Horst Gutmann <zerok@zerokspot.com> Assigned to: jezdez
Milestone: Component: django-admin.py
Version: SVN Keywords: makemessages, i18n, command
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

When executing the new ( #5522 ) makemessages command using manage.py, I receive a runtime error indicating that settings are initialized twice:

$ python manage.py makemessages -a
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/__init__.py", line 272, in execute_manager
    utility.execute()
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/__init__.py", line 219, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/base.py", line 77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/base.py", line 91, in execute
    output = self.handle(*args, **options)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 159, in handle
    make_messages(locale, domain, verbosity, process_all)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/core/management/commands/makemessages.py", line 17, in make_messages
    settings.configure(USE_I18N = True)
  File "/Users/zerok/.local/lib/python2.5/site-packages/django/conf/__init__.py", line 68, in configure
    raise RuntimeError, 'Settings already configured.'
RuntimeError: Settings already configured.

Attached is a small patch that's supposed to solve this and still work with django-admin.py :-)

Attachments

makemessages.diff (0.6 kB) - added by Horst Gutmann <zerok@zerokspot.com> on 07/06/08 07:39:43.

Change History

07/06/08 07:39:43 changed by Horst Gutmann <zerok@zerokspot.com>

  • attachment makemessages.diff added.

07/06/08 07:43:40 changed by jezdez

  • owner changed from nobody to jezdez.
  • needs_better_patch changed.
  • status changed from new to assigned.
  • needs_tests changed.
  • needs_docs changed.

I can confirm this, must have slipped through, d'oh.

07/06/08 07:55:24 changed by mtredinnick

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

(In [7848]) Fixed #7643 -- Fixed an oversight from [7844].

Now makemessages works in projects again. Based on a patch from Horst Gutmann.


Add/Change #7643 (manage.py makemessages not working)




Change Properties
Action