Opened 2 years ago

Last modified 2 years ago

#25264 new Cleanup/optimization

Misleading list of options available for manage.py commands

Reported by: Maxime Lorant Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Every commands has some options available, since the BaseCommand initialize some options to the options parser: verbosity, settings, traceback..

However, this can be misleading, because these arguments are not used by every commands and sometimes this choice is by design. For example, the runserver command does not use the verbosity option, and it has been explained why only there: https://code.djangoproject.com/ticket/15132

I think the framework should not show generic options that are not used in the current commands (through an explicit list of generic options ignored or an explicit list of commands used ?)

Change History (2)

comment:1 Changed 2 years ago by Maxime Lorant

Summary: MisleadingMisleading list of options available for manage.py commands

comment:2 Changed 2 years ago by Tim Graham

Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

I don't know that this is a big problem that is worth changing, but I guess if someone wants to propose a patch to fix the issue for runserver, we could entertain it. The documentation says these options are "available on all options" so this would require an update too. One consideration is that subclasses of runserver might use these options (verbosity most likely) so removing them by default would be backwards incompatible.

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