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:
parent
2d3712f930
commit
8d98e70e42
|
@ -121,6 +121,9 @@ class BaseCommand(object):
|
||||||
"""
|
"""
|
||||||
# Metadata about this command.
|
# Metadata about this command.
|
||||||
option_list = (
|
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',
|
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.'),
|
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',
|
make_option('--pythonpath',
|
||||||
|
|
|
@ -4,9 +4,6 @@ from optparse import make_option
|
||||||
|
|
||||||
class Command(NoArgsCommand):
|
class Command(NoArgsCommand):
|
||||||
option_list = NoArgsCommand.option_list + (
|
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,
|
make_option('--noinput', action='store_false', dest='interactive', default=True,
|
||||||
help='Tells Django to NOT prompt the user for input of any kind.'),
|
help='Tells Django to NOT prompt the user for input of any kind.'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,11 +10,6 @@ except NameError:
|
||||||
from sets import Set as set # Python 2.3 fallback
|
from sets import Set as set # Python 2.3 fallback
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
option_list = BaseCommand.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'),
|
|
||||||
)
|
|
||||||
help = 'Installs the named fixture(s) in the database.'
|
help = 'Installs the named fixture(s) in the database.'
|
||||||
args = "fixture [fixture ...]"
|
args = "fixture [fixture ...]"
|
||||||
|
|
||||||
|
|
|
@ -170,9 +170,6 @@ class Command(BaseCommand):
|
||||||
help='Creates or updates the message files only for the given locale (e.g. pt_BR).'),
|
help='Creates or updates the message files only for the given locale (e.g. pt_BR).'),
|
||||||
make_option('--domain', '-d', default='django', dest='domain',
|
make_option('--domain', '-d', default='django', dest='domain',
|
||||||
help='The domain of the message files (default: "django").'),
|
help='The domain of the message files (default: "django").'),
|
||||||
make_option('--verbosity', '-v', 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('--all', '-a', action='store_true', dest='all',
|
make_option('--all', '-a', action='store_true', dest='all',
|
||||||
default=False, help='Reexamines all source code and templates for new translation strings and updates all message files for all available languages.'),
|
default=False, help='Reexamines all source code and templates for new translation strings and updates all message files for all available languages.'),
|
||||||
make_option('--extension', '-e', dest='extensions',
|
make_option('--extension', '-e', dest='extensions',
|
||||||
|
|
|
@ -10,9 +10,6 @@ except NameError:
|
||||||
|
|
||||||
class Command(NoArgsCommand):
|
class Command(NoArgsCommand):
|
||||||
option_list = NoArgsCommand.option_list + (
|
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,
|
make_option('--noinput', action='store_false', dest='interactive', default=True,
|
||||||
help='Tells Django to NOT prompt the user for input of any kind.'),
|
help='Tells Django to NOT prompt the user for input of any kind.'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,9 +4,6 @@ import sys
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
option_list = BaseCommand.option_list + (
|
option_list = BaseCommand.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,
|
make_option('--noinput', action='store_false', dest='interactive', default=True,
|
||||||
help='Tells Django to NOT prompt the user for input of any kind.'),
|
help='Tells Django to NOT prompt the user for input of any kind.'),
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,9 +4,6 @@ from optparse import make_option
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
option_list = BaseCommand.option_list + (
|
option_list = BaseCommand.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('--addrport', action='store', dest='addrport',
|
make_option('--addrport', action='store', dest='addrport',
|
||||||
type='string', default='',
|
type='string', default='',
|
||||||
help='port number or ipaddr:port to run the server on'),
|
help='port number or ipaddr:port to run the server on'),
|
||||||
|
|
|
@ -85,12 +85,8 @@ Displaying debug output
|
||||||
.. django-admin-option:: --verbosity <amount>
|
.. django-admin-option:: --verbosity <amount>
|
||||||
|
|
||||||
Use ``--verbosity`` to specify the amount of notification and debug information
|
Use ``--verbosity`` to specify the amount of notification and debug information
|
||||||
that ``django-admin.py`` should print to the console.
|
that ``django-admin.py`` should print to the console. For more details, see the
|
||||||
|
documentation for the :ref:`default options for django-admin.py <django-admin-verbosity>`.
|
||||||
* ``0`` means no output.
|
|
||||||
* ``1`` means normal output (default).
|
|
||||||
* ``2`` means verbose output.
|
|
||||||
|
|
||||||
|
|
||||||
Available subcommands
|
Available subcommands
|
||||||
=====================
|
=====================
|
||||||
|
@ -367,20 +363,6 @@ The ``dumpdata`` command can be used to generate input for ``loaddata``.
|
||||||
references in your data files - MySQL doesn't provide a mechanism to
|
references in your data files - MySQL doesn't provide a mechanism to
|
||||||
defer checking of row constraints until a transaction is committed.
|
defer checking of row constraints until a transaction is committed.
|
||||||
|
|
||||||
--verbosity
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Use ``--verbosity`` to specify the amount of notification and debug information
|
|
||||||
that ``django-admin.py`` should print to the console.
|
|
||||||
|
|
||||||
* ``0`` means no output.
|
|
||||||
* ``1`` means normal output (default).
|
|
||||||
* ``2`` means verbose output.
|
|
||||||
|
|
||||||
Example usage::
|
|
||||||
|
|
||||||
django-admin.py loaddata --verbosity=2
|
|
||||||
|
|
||||||
makemessages
|
makemessages
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
@ -436,20 +418,6 @@ Currently supported:
|
||||||
* ``django`` for all ``*.py`` and ``*.html`` files (default)
|
* ``django`` for all ``*.py`` and ``*.html`` files (default)
|
||||||
* ``djangojs`` for ``*.js`` files
|
* ``djangojs`` for ``*.js`` files
|
||||||
|
|
||||||
--verbosity
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Use ``--verbosity`` or ``-v`` to specify the amount of notification and debug
|
|
||||||
information that ``django-admin.py`` should print to the console.
|
|
||||||
|
|
||||||
* ``0`` means no output.
|
|
||||||
* ``1`` means normal output (default).
|
|
||||||
* ``2`` means verbose output.
|
|
||||||
|
|
||||||
Example usage::
|
|
||||||
|
|
||||||
django-admin.py makemessages --verbosity=2
|
|
||||||
|
|
||||||
reset <appname appname ...>
|
reset <appname appname ...>
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
|
@ -685,20 +653,6 @@ with an appropriate extension (e.g. ``json`` or ``xml``). See the
|
||||||
documentation for ``loaddata`` for details on the specification of fixture
|
documentation for ``loaddata`` for details on the specification of fixture
|
||||||
data files.
|
data files.
|
||||||
|
|
||||||
--verbosity
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Use ``--verbosity`` to specify the amount of notification and debug information
|
|
||||||
that ``django-admin.py`` should print to the console.
|
|
||||||
|
|
||||||
* ``0`` means no output.
|
|
||||||
* ``1`` means normal output (default).
|
|
||||||
* ``2`` means verbose output.
|
|
||||||
|
|
||||||
Example usage::
|
|
||||||
|
|
||||||
django-admin.py syncdb --verbosity=2
|
|
||||||
|
|
||||||
--noinput
|
--noinput
|
||||||
~~~~~~~~~
|
~~~~~~~~~
|
||||||
|
|
||||||
|
@ -719,20 +673,6 @@ Use the ``--noinput`` option to suppress all user prompting, such as
|
||||||
"Are you sure?" confirmation messages. This is useful if ``django-admin.py``
|
"Are you sure?" confirmation messages. This is useful if ``django-admin.py``
|
||||||
is being executed as an unattended, automated script.
|
is being executed as an unattended, automated script.
|
||||||
|
|
||||||
--verbosity
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Use ``--verbosity`` to specify the amount of notification and debug information
|
|
||||||
that ``django-admin.py`` should print to the console.
|
|
||||||
|
|
||||||
* ``0`` means no output.
|
|
||||||
* ``1`` means normal output (default).
|
|
||||||
* ``2`` means verbose output.
|
|
||||||
|
|
||||||
Example usage::
|
|
||||||
|
|
||||||
django-admin.py test --verbosity=2
|
|
||||||
|
|
||||||
testserver <fixture fixture ...>
|
testserver <fixture fixture ...>
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
|
@ -793,20 +733,6 @@ To run on 1.2.3.4:7000 with a ``test`` fixture::
|
||||||
|
|
||||||
django-admin.py testserver --addrport 1.2.3.4:7000 test
|
django-admin.py testserver --addrport 1.2.3.4:7000 test
|
||||||
|
|
||||||
--verbosity
|
|
||||||
~~~~~~~~~~~
|
|
||||||
|
|
||||||
Use ``--verbosity`` to specify the amount of notification and debug information
|
|
||||||
that ``django-admin.py`` should print to the console.
|
|
||||||
|
|
||||||
* ``0`` means no output.
|
|
||||||
* ``1`` means normal output (default).
|
|
||||||
* ``2`` means verbose output.
|
|
||||||
|
|
||||||
Example usage::
|
|
||||||
|
|
||||||
django-admin.py testserver --verbosity=2
|
|
||||||
|
|
||||||
validate
|
validate
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
@ -861,6 +787,22 @@ By default, ``django-admin.py`` will show a simple error message whenever an
|
||||||
error occurs. If you specify ``--traceback``, ``django-admin.py`` will
|
error occurs. If you specify ``--traceback``, ``django-admin.py`` will
|
||||||
output a full stack trace whenever an exception is raised.
|
output a full stack trace whenever an exception is raised.
|
||||||
|
|
||||||
|
.. _django-admin-verbosity:
|
||||||
|
|
||||||
|
--verbosity
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Example usage::
|
||||||
|
|
||||||
|
django-admin.py syncdb --verbosity 2
|
||||||
|
|
||||||
|
Use ``--verbosity`` to specify the amount of notification and debug information
|
||||||
|
that ``django-admin.py`` should print to the console.
|
||||||
|
|
||||||
|
* ``0`` means no output.
|
||||||
|
* ``1`` means normal output (default).
|
||||||
|
* ``2`` means verbose output.
|
||||||
|
|
||||||
Extra niceties
|
Extra niceties
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
|
|
@ -212,7 +212,7 @@ Arguments sent with this signal:
|
||||||
|
|
||||||
``verbosity``
|
``verbosity``
|
||||||
Indicates how much information manage.py is printing on screen. See
|
Indicates how much information manage.py is printing on screen. See
|
||||||
the :djadminopt:`--verbosity`` flag for details.
|
the :djadminopt:`--verbosity` flag for details.
|
||||||
|
|
||||||
Functions which listen for :data:`post_syncdb` should adjust what they
|
Functions which listen for :data:`post_syncdb` should adjust what they
|
||||||
output to the screen based on the value of this argument.
|
output to the screen based on the value of this argument.
|
||||||
|
|
Loading…
Reference in New Issue