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 ?)
--
Ticket URL: <https://code.djangoproject.com/ticket/25264>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:1>
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
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 "[https://docs.djangoproject.com/en/1.8/ref/django-admin/#default-
options 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:2>
* easy: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:3>
* owner: nobody => Edald123
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:4>
* owner: Edald123 => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:5>
* owner: (none) => Yuneui Jeong
* status: new => assigned
Comment:
Can I have a look at and work on this ticket? This is my first
contribution, but I'll try my best.
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:6>
Comment (by Yuneui Jeong):
Here's the PR for this ticket: https://github.com/django/django/pull/14612
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:7>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:8>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:9>
* needs_better_patch: 1 => 0
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:10>
* owner: Yuneui Jeong => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:11>
* owner: (none) => Jan Szoja
* status: new => assigned
Comment:
That shounds like nice and easy ticket for the beginner like myself.
I will start with allowing setting argparse.SUPPRESS(as suggester in PR)
in BaseCommand and possibly more advance way to tell which default
commands are supported. Will see.
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:12>
* cc: Jan Szoja (added)
* has_patch: 0 => 1
Comment:
Pull Request awailable at:
https://github.com/django/django/pull/14694
I've added new attribute to BaseCommand class, which allows to disable any
option/argument predefined in BaseCommand.create_parser.
All tests passed for admin_scripts.
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:13>
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:14>
* needs_docs: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:15>
* needs_docs: 1 => 0
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:16>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:17>
* easy: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:18>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"3cca5fdd3eb5906a385adaf9872581d4ed359041" 3cca5fdd]:
{{{
#!CommitTicketReference repository=""
revision="3cca5fdd3eb5906a385adaf9872581d4ed359041"
Refs #25264 -- Doc's that not all default options are supported by every
management command.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:19>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"97f377cd3520794f7d4e97b7aa1fa2093c426273" 97f377c]:
{{{
#!CommitTicketReference repository=""
revision="97f377cd3520794f7d4e97b7aa1fa2093c426273"
Refs #25264 -- Added test for command --help output with default options
and custom arguments.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:20>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"b667ac24ead73300c49e265201b6c0b913ee36a3" b667ac2]:
{{{
#!CommitTicketReference repository=""
revision="b667ac24ead73300c49e265201b6c0b913ee36a3"
Fixed #25264 -- Allowed suppressing base command options in --help output.
This also suppresses -verbosity and --trackback options in the
runserver's help.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:21>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"4e55806720f623f08ced65bf5927780ea210a80e" 4e55806]:
{{{
#!CommitTicketReference repository=""
revision="4e55806720f623f08ced65bf5927780ea210a80e"
[3.2.x] Refs #25264 -- Doc's that not all default options are supported by
every management command.
Backport of 3cca5fdd3eb5906a385adaf9872581d4ed359041 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25264#comment:22>