diff options
| author | Chandrakant Kumar <k.03chandra@gmail.com> | 2017-01-28 16:02:33 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-06-16 21:28:38 -0400 |
| commit | 2b09e4c88e96cb03b29f5a6b0e4838ab4271e631 (patch) | |
| tree | e5c7322c72e80add326cce75dc3b5cfbc3f52189 /docs | |
| parent | 92e286498acd4f4562be11c21879856de8f47252 (diff) | |
Fixed #27787 -- Made call_command() validate the options it receives.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/2.0.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/releases/2.0.txt b/docs/releases/2.0.txt index 6af7545199..9a7c207fd6 100644 --- a/docs/releases/2.0.txt +++ b/docs/releases/2.0.txt @@ -384,6 +384,18 @@ raises an exception and should be replaced with:: forms.IntegerField(max_value=25, min_value=10) +``call_command()`` validates the options it receives +---------------------------------------------------- + +``call_command()`` now validates that the argument parser of the command being +called defines all of the options passed to ``call_command()``. + +For custom management commands that use options not created using +``parser.add_argument()``, add a ``stealth_options`` attribute on the command:: + + class MyCommand(BaseCommand): + stealth_options = ('option_name', ...) + Miscellaneous ------------- |
