summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Nester <andrew.nester.dev@gmail.com>2017-01-28 00:12:45 +0300
committerTim Graham <timograham@gmail.com>2017-01-27 17:21:41 -0500
commit33ff4e4e587853ffdcf603419ea0502cf3788c3a (patch)
tree3977040e84d3de45033ecedfa75f47292d6046d8
parentd9f2887645e8babd332afdf971dc66a02428eaff (diff)
[1.11.x] Fixed #27769 -- Documented option naming differences between django-admin and call_command().
Backport of c8d21f335113dcf6009d7aa9810d4e77dc58c75d from master
-rw-r--r--docs/ref/django-admin.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 47cff8e8c6..0e59d65d50 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -1807,6 +1807,13 @@ Named arguments can be passed by using either one of the following syntaxes::
# `use_natural_foreign_keys` is the option destination variable
management.call_command('dumpdata', use_natural_foreign_keys=True)
+Some command options have different names when using ``call_command()`` instead
+of ``django-admin`` or ``manage.py``. For example, ``django-admin
+createsuperuser --no-input`` translates to ``call_command('createsuperuser',
+interactive=False)``. To find what keyword argument name to use for
+``call_command()``, check the command's source code for the ``dest`` argument
+passed to ``parser.add_argument()``.
+
Command options which take multiple options are passed a list::
management.call_command('dumpdata', exclude=['contenttypes', 'auth'])