summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-03-12 17:44:08 -0500
committerTim Graham <timograham@gmail.com>2016-03-14 08:29:28 -0400
commit7b2ee75745a5304b222b71b3273ff14a40da47f4 (patch)
tree0005ad0ce8b02f0f294efe03c473ff851fa4e295 /docs/ref
parent9ed08da6c6bd45e18c743c80a086403a5d57a308 (diff)
[1.9.x] Fixed #26294 -- Clarified call_command()'s handling of args and options.
Backport of 5695c142d282f4681a8d43bb55ec49f11f3fc40e from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/django-admin.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index e9f3c1659d..2144bba219 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1749,10 +1749,15 @@ To call a management command from code use ``call_command``.
the name of the command to call.
``*args``
- a list of arguments accepted by the command.
+ a list of arguments accepted by the command. Arguments are passed to the
+ argument parser, so you can use the same style as you would on the command
+ line. For example, ``call_command('flush', 'verbosity=0')``.
``**options``
- named options accepted on the command-line.
+ named options accepted on the command-line. Options are passed to the command
+ without triggering the argument parser, which means you'll need to pass the
+ correct type. For example, ``call_command('flush', verbosity=0)`` (zero must
+ be an integer rather than a string).
Examples::