Django

Code

Ticket #7910 (closed: fixed)

Opened 4 months ago

Last modified 4 months ago

missing import in compilemessages

Reported by: yml Assigned to: nobody
Milestone: Component: Internationalization
Version: SVN Keywords: i18n, compilemessages
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description (Last modified by ramiro)

To put it in a nutshell someone should add : from django.core.management.base import CommandError At the top of the file called "compilemessages.py"

Traceback :

django-survey\examples>django-admin.py compilemessages  --setings="examples.settings"
Usage: C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\bin\django-admin.py compilemessages [options]

Compiles .po files to .mo files for use with builtin gettext support.

C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\bin\django-admin.py: error: no such option: --setings

C:\yml\_myScript_\dj_things\web_development\django-survey\examples>django-admin.py compilemessages  --settings="examples.settings"
Traceback (most recent call last):
  File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\bin\django-admin.py", line 5, in <module>
    management.execute_from_command_line()
  File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\__init__.py", line 292, in execute_from_command_line
    utility.execute()
  File "C:\yml\_myScript_\dj_things\web_development\svn_viewsexternal_libs\django\core\management\__init__.py", line 248, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\yml\_myScript_\dj_things\web_development\svn_viewsexternal_libs\django\core\management\base.py", line 77, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\yml\_myScript_\dj_things\web_development\svn_viewsexternal_libs\django\core\management\base.py", line 91, in execute
    output = self.handle(*args, **options)
  File "C:\yml\_myScript_\dj_things\web_development\svn_viewsexternal_libs\django\core\management\commands\compilemessages.py", line 58, in handle
    compile_messages(locale)
  File "C:\yml\_myScript_\dj_things\web_development\svn_views\external_libs\django\core\management\commands\compilemessages.py", line 22, in compile_messages
    raise CommandError("This script should be run from the Django SVN tree or your project or app tree, or with the settings module specified.")
NameError: global name 'CommandError' is not defined

Attachments

7910.patch (471 bytes) - added by mk on 07/24/08 08:05:31.

Change History

07/23/08 06:37:04 changed by ramiro

  • needs_better_patch changed.
  • description changed.
  • needs_tests changed.
  • needs_docs changed.

07/24/08 08:05:31 changed by mk

  • attachment 7910.patch added.

07/24/08 08:05:50 changed by mk

  • has_patch set to 1.
  • stage changed from Unreviewed to Ready for checkin.

07/25/08 22:01:34 changed by mtredinnick

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

(In [8079]) Fix #7910 -- Added a missing import used when "django-admin.py compilemessages" is run from a bad root directory.


Add/Change #7910 (missing import in compilemessages)




Change Properties
Action