[Django] #19570: call_command options

22 views
Skip to first unread message

Django

unread,
Jan 6, 2013, 5:56:05 AM1/6/13
to django-...@googlegroups.com
#19570: call_command options
--------------------------------------+--------------------------------
Reporter: leftmoose | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords: call_command, docs
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------------------
when used with call_command, certain management commands use keywords
differing from the command line options,

e.g.
{{{
./manage.py flush --no-initial-data
}}}

needs to be called with


{{{
call_command('flush', load_initial_data=False)
}}}

Maybe the docs (for {{{call_command}}}) should be updated to reflect this.
(Though not sure what advice to give beyond "read the source").
Alternatively, we chould add notes to each option where the names differ,
but that seems messy.

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

Django

unread,
Jan 7, 2013, 1:39:49 PM1/7/13
to django-...@googlegroups.com
#19570: call_command options
--------------------------------------+------------------------------------

Reporter: leftmoose | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: call_command, docs | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by ptone):

* needs_docs: => 0
* needs_better_patch: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

At a minimum - this should be documented.

A more complete patch might attempt to support all command line options
for builtin commands with the pattern of dashes replaced with underscores.

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

Django

unread,
Jan 7, 2013, 4:47:29 PM1/7/13
to django-...@googlegroups.com
#19570: call_command options
--------------------------------------+------------------------------------

Reporter: leftmoose | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: call_command, docs | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by leftmoose):

currently not matching options


{{{

command command line arg option.dest

syncdb --noinput interactive
syncdb --no-initial-data load_initial_data
dumpdata --natural use_natural_keys
dumpdata --all use_base_manager
testserver --noinput interactive
testserver --ipv6 use_ipv6
templates --extension extensions
templates --name files
startproject --extension extensions
startproject --name files
flush --noinput interactive
flush --no-initial-data load_initial_data
startapp --extension extensions
startapp --name files
makemessages --extension extensions
makemessages --ignore ignore_patterns
makemessages --no-default-ignore use_default_ignore_patterns
loaddata --ignorenonexistent ignore
runserver --ipv6 use_ipv6
runserver --nothreading use_threading
runserver --noreload use_reloader
test --noinput interactive

}}}

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

Django

unread,
Jan 7, 2013, 6:36:28 PM1/7/13
to django-...@googlegroups.com
#19570: call_command options
--------------------------------------+------------------------------------

Reporter: leftmoose | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: call_command, docs | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by leftmoose):

* has_patch: 0 => 1


Comment:

patch: https://github.com/django/django/pull/624

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

Django

unread,
Jan 9, 2013, 7:19:17 PM1/9/13
to django-...@googlegroups.com
#19570: call_command options
--------------------------------------+------------------------------------

Reporter: leftmoose | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: call_command, docs | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by ptone):

* needs_docs: 0 => 1


Comment:

If we are going with the full mapping - this will need to be documented. I
wouldn't deprecate the original kwargs, but only document the ones that
match the CLI options and describe the - to _ pattern, maybe note that
some commands have some legacy analogs - not entirely sure about that last
bit though.

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

Django

unread,
Jan 15, 2013, 7:42:22 PM1/15/13
to django-...@googlegroups.com
#19570: call_command options
-------------------------------------+-------------------------------------
Reporter: leftmoose | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 1
Keywords: call_command, docs | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timo):

* component: Documentation => Core (Management commands)


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

Django

unread,
Aug 9, 2014, 3:13:45 PM8/9/14
to django-...@googlegroups.com
#19570: call_command options
-------------------------------------+-------------------------------------
Reporter: leftmoose | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 1
Keywords: call_command, docs | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by claudep):

I guess the patch I proposed for #22985 would solve this issue, too.

--
Ticket URL: <https://code.djangoproject.com/ticket/19570#comment:6>

Django

unread,
Aug 10, 2014, 10:39:43 AM8/10/14
to django-...@googlegroups.com
#19570: call_command options
-------------------------------------+-------------------------------------
Reporter: leftmoose | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 1
Keywords: call_command, docs | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------

Comment (by areski):

I was also working on different approach to solve this ticket which might
now become irrelevant with claudep fix.

I still leave the PR for interest maybe some of you would still want to
see more consistency with the option names.
Here it is https://github.com/django/django/pull/3040

--
Ticket URL: <https://code.djangoproject.com/ticket/19570#comment:7>

Django

unread,
Aug 10, 2014, 10:40:23 AM8/10/14
to django-...@googlegroups.com
#19570: call_command options
-------------------------------------+-------------------------------------
Reporter: leftmoose | Owner: nobody

Type: | Status: new
Cleanup/optimization | Version: master
Component: Core (Management | Resolution:
commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 1
Keywords: call_command, docs | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by areski):

* cc: areski (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/19570#comment:8>

Django

unread,
Aug 12, 2014, 12:43:03 PM8/12/14
to django-...@googlegroups.com
#19570: call_command option kwargs differ from command line options
-------------------------------------+-------------------------------------
Reporter: leftmoose | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: master
Component: Core (Management | Resolution: duplicate

commands) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 1
Keywords: call_command, docs | Patch needs improvement: 0
Has patch: 1 | UI/UX: 0
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* resolution: => duplicate


Comment:

Marking as a duplicate given Claude's fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/19570#comment:9>

Reply all
Reply to author
Forward
0 new messages