mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Promoted --verbosity to be a top level option for all management commands. Also added -v as a consistent short form of --verbosity. This is mostly to save Malcolm's poor arthritic fingers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9110 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -121,6 +121,9 @@ class BaseCommand(object):
|
||||
"""
|
||||
# Metadata about this command.
|
||||
option_list = (
|
||||
make_option('-v', '--verbosity', action='store', dest='verbosity', default='1',
|
||||
type='choice', choices=['0', '1', '2'],
|
||||
help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
|
||||
make_option('--settings',
|
||||
help='The Python path to a settings module, e.g. "myproject.settings.main". If this isn\'t provided, the DJANGO_SETTINGS_MODULE environment variable will be used.'),
|
||||
make_option('--pythonpath',
|
||||
@@ -209,7 +212,7 @@ class BaseCommand(object):
|
||||
from django.utils import translation
|
||||
translation.activate('en-us')
|
||||
except ImportError, e:
|
||||
# If settings should be available, but aren't,
|
||||
# If settings should be available, but aren't,
|
||||
# raise the error and quit.
|
||||
sys.stderr.write(self.style.ERROR(str('Error: %s\n' % e)))
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user