summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJan Szoja <jszoja@gmail.com>2021-07-25 00:16:00 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-08-31 11:04:02 +0200
commitb667ac24ead73300c49e265201b6c0b913ee36a3 (patch)
tree983386432906bc7372abee193a5bb50f20bb894b /docs
parent97f377cd3520794f7d4e97b7aa1fa2093c426273 (diff)
Fixed #25264 -- Allowed suppressing base command options in --help output.
This also suppresses -verbosity and --trackback options in the runserver's help.
Diffstat (limited to 'docs')
-rw-r--r--docs/howto/custom-management-commands.txt8
-rw-r--r--docs/releases/4.0.txt4
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt
index 3ecde33d67..0cb06a826d 100644
--- a/docs/howto/custom-management-commands.txt
+++ b/docs/howto/custom-management-commands.txt
@@ -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
-------
diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt
index 53b738c8ec..5849b08cd4 100644
--- a/docs/releases/4.0.txt
+++ b/docs/releases/4.0.txt
@@ -274,6 +274,10 @@ Management Commands
As a consequence, ``readline`` is no longer loaded if running in *isolated*
mode.
+* The new :attr:`BaseCommand.suppressed_base_arguments
+ <django.core.management.BaseCommand.suppressed_base_arguments>` attribute
+ allows suppressing unsupported default command options in the help output.
+
Migrations
~~~~~~~~~~