Changeset 1185
- Timestamp:
- 11/11/05 17:34:08 (3 years ago)
- Files:
-
- django/trunk/django/bin/django-admin.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/bin/django-admin.py
r1173 r1185 3 3 from optparse import OptionParser 4 4 import os, sys 5 6 # switch to english, because django-admin creates database content7 # like permissions, and those shouldn't contain any translations8 try:9 from django.utils import translation10 translation.activate('en-us')11 except:12 pass13 5 14 6 ACTION_MAPPING = { … … 81 73 if not ACTION_MAPPING.has_key(action): 82 74 print_error("Your action, %r, was invalid." % action, sys.argv[0]) 75 76 # switch to english, because django-admin creates database content 77 # like permissions, and those shouldn't contain any translations. 78 # But only do this if we should have a working settings file. 79 if action not in ('startproject', 'startapp'): 80 from django.utils import translation 81 translation.activate('en-us') 82 83 83 if action in ('createsuperuser', 'init', 'validate'): 84 84 ACTION_MAPPING[action]()
