summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNiels Van Och <niels.vanoch@gmail.com>2015-11-07 12:07:28 +0100
committerTim Graham <timograham@gmail.com>2016-01-06 18:43:41 -0500
commit7f7553dd30534d606c84952a3f6dcb64b396ce37 (patch)
treeb96009e4d8af11ff5b6255ccfbe9cd34214e74ed /docs
parent0cc32a8f9782f0e465b4653012de9bc41e6d7db4 (diff)
Fixed #25680 -- Added django-admin shell --command option.
Add a -c option to the shell command to execute a command passed as a string as Django.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/django-admin.txt9
-rw-r--r--docs/releases/1.10.txt3
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt
index 24ea5906ae..870f5dfc5c 100644
--- a/docs/ref/django-admin.txt
+++ b/docs/ref/django-admin.txt
@@ -970,6 +970,15 @@ behavior you can use the ``--no-startup`` option. e.g.::
django-admin shell --interface python --no-startup
+.. django-admin-option:: --command, -c <command>
+
+.. versionadded:: 1.10
+
+The ``--command`` option lets you pass a command as a string to execute it as
+Django, like so::
+
+ django-admin shell --command="import django; print(django.__version__)"
+
showmigrations [<app_label> [<app_label>]]
------------------------------------------
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index 94565ccec7..0eec66faee 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -224,6 +224,9 @@ Management Commands
* The :djadmin:`shell` ``--interface`` option now accepts ``python`` to force
use of the "plain" Python interpreter.
+* The new :djadminopt:`shell --command <--command>` option lets you run a
+ command as Django and exit, instead of opening the interactive shell.
+
Migrations
^^^^^^^^^^