[Django] #32667: Clarify about tags on BaseCommand.require_system_checks

24 views
Skip to first unread message

Django

unread,
Apr 20, 2021, 6:16:47 AM4/20/21
to django-...@googlegroups.com
#32667: Clarify about tags on BaseCommand.require_system_checks
------------------------------------------------+--------------------------
Reporter: abhiabhi94 | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 3.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+--------------------------
The current documentation regarding
[https://docs.djangoproject.com/en/3.2/howto/custom-management-
commands/#django.core.management.BaseCommand.requires_system_checks/
requires_system_checks] mention `Tags` but it isn't very clear where
`Tags` come from. I'm just quoting the documentation here for easy of
conversation.

> 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__'.

I didn't exactly find a definition on that page.

Digging into the source, I found that `Tags` actually come from
`django.core.registry.check`. I think it would be worthwhile mentioning
the actual reference here. I could potentially make the documentation more
clear.

If acceptable, I would be willing to make the patch for it.

--
Ticket URL: <https://code.djangoproject.com/ticket/32667>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 20, 2021, 6:46:45 AM4/20/21
to django-...@googlegroups.com
#32667: Clarify about tags on BaseCommand.require_system_checks
--------------------------------------+------------------------------------
Reporter: Abhyudai | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Core (System checks) | Version: 3.2
Severity: Normal | Resolution:
Keywords: documentation | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* keywords: => documentation
* component: Documentation => Core (System checks)
* stage: Unreviewed => Accepted


Comment:

IMO it should be enough to add a link to the
[https://docs.djangoproject.com/en/dev/topics/checks/#registering-and-
labeling-checks Registering and labeling checks], e.g.
{{{
diff --git a/docs/howto/custom-management-commands.txt b/docs/howto
/custom-management-commands.txt
index 5d1a8ddd2d..e80540afaa 100644
--- a/docs/howto/custom-management-commands.txt
+++ b/docs/howto/custom-management-commands.txt
@@ -218,9 +218,10 @@ All attributes can be set in your derived class and
can be used in
.. attribute:: BaseCommand.requires_system_checks

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__'``.
+ checks :ref:`registered in the chosen tags <registering-labeling-
checks>`
+ 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

diff --git a/docs/topics/checks.txt b/docs/topics/checks.txt
index 438139ad31..1a5594fc27 100644
--- a/docs/topics/checks.txt
+++ b/docs/topics/checks.txt
@@ -77,6 +77,8 @@ implied by the class name.
* :class:`Error`
* :class:`Critical`

+.. _registering-labeling-checks:
+
Registering and labeling checks
-------------------------------

}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32667#comment:1>

Django

unread,
Apr 20, 2021, 7:16:44 AM4/20/21
to django-...@googlegroups.com
#32667: Clarify about tags on BaseCommand.require_system_checks
--------------------------------------+------------------------------------
Reporter: Abhyudai | Owner: Abhyudai
Type: Cleanup/optimization | Status: assigned

Component: Core (System checks) | Version: 3.2
Severity: Normal | Resolution:
Keywords: documentation | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Abhyudai):

* owner: nobody => Abhyudai


--
Ticket URL: <https://code.djangoproject.com/ticket/32667#comment:2>

Django

unread,
Apr 21, 2021, 7:35:39 AM4/21/21
to django-...@googlegroups.com
#32667: Clarify about tags on BaseCommand.require_system_checks
--------------------------------------+------------------------------------
Reporter: Abhyudai | Owner: Abhyudai
Type: Cleanup/optimization | Status: assigned

Component: Core (System checks) | Version: 3.2
Severity: Normal | Resolution:
Keywords: documentation | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/14295 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/32667#comment:3>

Django

unread,
Apr 21, 2021, 10:40:26 AM4/21/21
to django-...@googlegroups.com
#32667: Clarify about tags on BaseCommand.require_system_checks
--------------------------------------+------------------------------------
Reporter: Abhyudai | Owner: Abhyudai
Type: Cleanup/optimization | Status: closed

Component: Core (System checks) | Version: 3.2
Severity: Normal | Resolution: fixed

Keywords: documentation | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by GitHub <noreply@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"4a77aeb1f86bc06e18023cac10109e067ed20800" 4a77aeb1]:
{{{
#!CommitTicketReference repository=""
revision="4a77aeb1f86bc06e18023cac10109e067ed20800"
Fixed #32667 -- Added link to labeling checks in
BaseCommand.requires_system_checks docs.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32667#comment:4>

Django

unread,
Apr 21, 2021, 10:40:59 AM4/21/21
to django-...@googlegroups.com
#32667: Clarify about tags on BaseCommand.require_system_checks
--------------------------------------+------------------------------------
Reporter: Abhyudai | Owner: Abhyudai
Type: Cleanup/optimization | Status: closed
Component: Core (System checks) | Version: 3.2
Severity: Normal | Resolution: fixed
Keywords: documentation | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"7d7c6d9a3a75f7e0dfe1e7fb992e3c3a6068a87e" 7d7c6d9]:
{{{
#!CommitTicketReference repository=""
revision="7d7c6d9a3a75f7e0dfe1e7fb992e3c3a6068a87e"
[3.2.x] Fixed #32667 -- Added link to labeling checks in
BaseCommand.requires_system_checks docs.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
Backport of 4a77aeb1f86bc06e18023cac10109e067ed20800 from main
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/32667#comment:5>

Reply all
Reply to author
Forward
0 new messages