diff options
| author | Maxime Turcotte <maxime.turcotte@savoirfairelinux.com> | 2014-06-17 19:07:54 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-06-19 08:54:59 -0400 |
| commit | 9996158db467f9bef8243fcc36dc3602570e3613 (patch) | |
| tree | bf3b5cb36e3083b84de592d6e9da4fd2d131c5f4 /docs | |
| parent | 63670a474c14b1989f1a3f4ee7fd0fbacb5a764a (diff) | |
Fixed #22835 -- Deprecated NoArgsCommand.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/howto/custom-management-commands.txt | 8 | ||||
| -rw-r--r-- | docs/internals/deprecation.txt | 4 | ||||
| -rw-r--r-- | docs/releases/1.8.txt | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt index bb15597a34..c43af9672d 100644 --- a/docs/howto/custom-management-commands.txt +++ b/docs/howto/custom-management-commands.txt @@ -152,8 +152,8 @@ require a system-neutral string language (for which we use 'en-us'). If, for some reason, your custom management command needs to use a fixed locale different from 'en-us', you should manually activate and deactivate it in your -:meth:`~BaseCommand.handle` or :meth:`~NoArgsCommand.handle_noargs` method using -the functions provided by the I18N support code: +:meth:`~BaseCommand.handle` method using the functions provided by the I18N +support code: .. code-block:: python @@ -431,6 +431,10 @@ Rather than implementing :meth:`~BaseCommand.handle`, subclasses must implement .. class:: NoArgsCommand +.. deprecated:: 1.8 + + Use :class:`BaseCommand` instead, which takes no arguments by default. + A command which takes no arguments on the command line. Rather than implementing :meth:`~BaseCommand.handle`, subclasses must implement diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 82ffe4938f..39c42ae7bf 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -38,6 +38,10 @@ about each item can often be found in the release notes of two versions prior. * Support for :py:mod:`optparse` will be dropped for custom management commands (replaced by :py:mod:`argparse`). +* The class :class:`~django.core.management.NoArgsCommand` will be removed. Use + :class:`~django.core.management.BaseCommand` instead, which takes no arguments + by default. + .. _deprecation-removed-in-1.9: 1.9 diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt index 32de9ba631..54bfd2b2ea 100644 --- a/docs/releases/1.8.txt +++ b/docs/releases/1.8.txt @@ -471,3 +471,10 @@ to add custom arguments to commands has changed: instead of extending the :meth:`~django.core.management.BaseCommand.add_arguments` method and add arguments through ``argparse.add_argument()``. See :ref:`this example <custom-commands-options>` for more details. + +``django.core.management.NoArgsCommand`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The class :class:`~django.core.management.NoArgsCommand` is now deprecated and +will be removed in Django 2.0. Use :class:`~django.core.management.BaseCommand` +instead, which takes no arguments by default. |
