Fixed #25264 -- Allowed suppressing base command options in --help output.

This also suppresses -verbosity and --trackback options in the
runserver's help.
This commit is contained in:
Jan Szoja 2021-07-25 00:16:00 +01:00 committed by Mariusz Felisiak
parent 97f377cd35
commit b667ac24ea
6 changed files with 105 additions and 12 deletions

View file

@ -242,6 +242,14 @@ All attributes can be set in your derived class and can be used in
If you pass the :option:`--no-color` option when running your command, all
``self.style()`` calls will return the original string uncolored.
.. attribute:: BaseCommand.suppressed_base_arguments
.. versionadded:: 4.0
The default command options to suppress in the help output. This should be
a set of option names (e.g. ``'--verbosity'``). The default values for the
suppressed options are still passed.
Methods
-------