diff --git a/django/core/management/base.py b/django/core/management/base.py
index db855e1..730bd49 100644
|
a
|
b
|
class BaseCommand(object):
|
| 204 | 204 | stderr. |
| 205 | 205 | """ |
| 206 | 206 | show_traceback = options.get('traceback', False) |
| 207 | | |
| | 207 | self.stdout = options.get('stdout', sys.stdout) |
| | 208 | self.stderr = options.get('stderr', sys.stderr) |
| | 209 | |
| 208 | 210 | # Switch to English, because django-admin.py creates database content |
| 209 | 211 | # like permissions, and those shouldn't contain any translations. |
| 210 | 212 | # But only do this if we can assume we have a working settings file, |
| … |
… |
class BaseCommand(object):
|
| 215 | 217 | from django.utils import translation |
| 216 | 218 | saved_lang = translation.get_language() |
| 217 | 219 | translation.activate('en-us') |
| | 220 | if int(options.get('verbosity', 1)) >= 2: |
| | 221 | self.stdout.write("Active language set to 'en-us'.\n") |
| 218 | 222 | except ImportError, e: |
| 219 | 223 | # If settings should be available, but aren't, |
| 220 | 224 | # raise the error and quit. |
| … |
… |
class BaseCommand(object):
|
| 225 | 229 | sys.exit(1) |
| 226 | 230 | |
| 227 | 231 | try: |
| 228 | | self.stdout = options.get('stdout', sys.stdout) |
| 229 | | self.stderr = options.get('stderr', sys.stderr) |
| 230 | 232 | if self.requires_model_validation: |
| 231 | 233 | self.validate() |
| 232 | 234 | output = self.handle(*args, **options) |
diff --git a/django/core/management/commands/shell.py b/django/core/management/commands/shell.py
index 26cbd7f..507f3a7 100644
|
a
|
b
|
class Command(NoArgsCommand):
|
| 9 | 9 | ) |
| 10 | 10 | help = "Runs a Python interactive interpreter. Tries to use IPython, if it's available." |
| 11 | 11 | shells = ['ipython', 'bpython'] |
| | 12 | can_import_settings = False |
| 12 | 13 | requires_model_validation = False |
| 13 | 14 | |
| 14 | 15 | def ipython(self): |