Opened 5 years ago

Closed 5 years ago

#17625 closed Uncategorized (fixed)

Management command docs should mention underscore prefix

Reported by: murphyke Owned by: Grzegorz Nosek
Component: Documentation Version: 1.4-alpha-1
Severity: Normal Keywords:
Cc: chomik Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The documentation for custom management commands should mention how to exclude source files from being listed or used as management commands. I've confirmed that the dev docs do not mention this.

Looking at the (1.3) source code for django.core.management, I see that files prefixed with underscores ("_") are ignored or prevented from being considered as management commands.

Being able to do so is occasionally important, as when several commands depend on a helper class.

Reference: https://docs.djangoproject.com/en/dev/howto/custom-management-commands/

Attachments (1)

17625.diff (1.5 KB) - added by Grzegorz Nosek 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by chomik

Cc: chomik added
Easy pickings: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

Changed 5 years ago by Grzegorz Nosek

Attachment: 17625.diff added

comment:2 Changed 5 years ago by Grzegorz Nosek

Has patch: set
Owner: changed from nobody to Grzegorz Nosek
Status: newassigned

comment:3 Changed 5 years ago by Tomek Paczkowski

Triage Stage: AcceptedReady for checkin

Describes stuff. Renders nicely. Good work.

comment:4 Changed 5 years ago by Jannis Leidel

Resolution: fixed
Status: assignedclosed

In [17440]:

Fixed #17625 -- Mention in the management command docs that modules with an underscore prefix are ignored and not dissplayed in the list of commands.

Note: See TracTickets for help on using tickets.
Back to Top