mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46: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:
@@ -10,9 +10,6 @@ except NameError:
|
||||
|
||||
class Command(NoArgsCommand):
|
||||
option_list = NoArgsCommand.option_list + (
|
||||
make_option('--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('--noinput', action='store_false', dest='interactive', default=True,
|
||||
help='Tells Django to NOT prompt the user for input of any kind.'),
|
||||
)
|
||||
@@ -41,7 +38,7 @@ class Command(NoArgsCommand):
|
||||
# but raises an ImportError for some reason. The only way we
|
||||
# can do this is to check the text of the exception. Note that
|
||||
# we're a bit broad in how we check the text, because different
|
||||
# Python implementations may not use the same text.
|
||||
# Python implementations may not use the same text.
|
||||
# CPython uses the text "No module named management"
|
||||
# PyPy uses "No module named myproject.myapp.management"
|
||||
msg = exc.args[0]
|
||||
@@ -99,10 +96,10 @@ class Command(NoArgsCommand):
|
||||
# Send the post_syncdb signal, so individual apps can do whatever they need
|
||||
# to do at this point.
|
||||
emit_post_sync_signal(created_models, verbosity, interactive)
|
||||
|
||||
|
||||
# The connection may have been closed by a syncdb handler.
|
||||
cursor = connection.cursor()
|
||||
|
||||
|
||||
# Install custom SQL for the app (but only if this
|
||||
# is a model we've just created)
|
||||
for app in models.get_apps():
|
||||
|
||||
Reference in New Issue
Block a user