diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-05-14 00:00:41 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2020-05-21 12:34:54 +0200 |
| commit | c60524c658f197f645b638f9bcc553103bfe2630 (patch) | |
| tree | 46c3f2c654626caddbd2764b195adf2fcb4a21fa /docs | |
| parent | a4e6030904df63b3f10aa0729b86dc6942b0458e (diff) | |
Fixed #31546 -- Allowed specifying list of tags in Command.requires_system_checks.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/howto/custom-management-commands.txt | 11 | ||||
| -rw-r--r-- | docs/internals/deprecation.txt | 2 | ||||
| -rw-r--r-- | docs/ref/django-admin.txt | 2 | ||||
| -rw-r--r-- | docs/releases/3.2.txt | 9 |
4 files changed, 21 insertions, 3 deletions
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto/custom-management-commands.txt index 77c4c61e8c..eda7b2a42c 100644 --- a/docs/howto/custom-management-commands.txt +++ b/docs/howto/custom-management-commands.txt @@ -215,8 +215,15 @@ All attributes can be set in your derived class and can be used in .. attribute:: BaseCommand.requires_system_checks - A boolean; if ``True``, the entire Django project will be checked for - potential problems prior to executing the command. Default value is ``True``. + A list or tuple of tags, e.g. ``[Tags.staticfiles, Tags.models]``. System + checks registered in the chosen tags will be checked for errors prior to + executing the command. The value ``'__all__'`` can be used to specify + that all system checks should be performed. Default value is ``'__all__'``. + + .. versionchanged:: 3.2 + + In older versions, the ``requires_system_checks`` attribute expects a + boolean value instead of a list or tuple of tags. .. attribute:: BaseCommand.style diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index d4cc1d2d95..dd80acf833 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -19,6 +19,8 @@ details on these changes. ``copy.deepcopy()`` to class attributes in ``TestCase.setUpTestData()`` will be removed. +* ``BaseCommand.requires_system_checks`` won't support boolean values. + .. _deprecation-removed-in-4.0: 4.0 diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 46e048e648..f67849c848 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1826,7 +1826,7 @@ colored output to another command. Skips running system checks prior to running the command. This option is only available if the :attr:`~django.core.management.BaseCommand.requires_system_checks` command -attribute is set to ``True``. +attribute is not an empty list or tuple. Example usage:: diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt index e646fe4681..7aa01dcc23 100644 --- a/docs/releases/3.2.txt +++ b/docs/releases/3.2.txt @@ -161,6 +161,11 @@ Management Commands connection. In that case, check for a consistent migration history is skipped. +* :attr:`.BaseCommand.requires_system_checks` now supports specifying a list of + tags. System checks registered in the chosen tags will be checked for errors + prior to executing the command. In previous versions, either all or none + of the system checks were performed. + Migrations ~~~~~~~~~~ @@ -273,3 +278,7 @@ Miscellaneous * Assigning objects which don't support creating deep copies with :py:func:`copy.deepcopy` to class attributes in :meth:`.TestCase.setUpTestData` is deprecated. + +* Using a boolean value in :attr:`.BaseCommand.requires_system_checks` is + deprecated. Use ``'__all__'`` instead of ``True``, and ``[]`` (an empty list) + instead of ``False``. |
