From 7f7553dd30534d606c84952a3f6dcb64b396ce37 Mon Sep 17 00:00:00 2001 From: Niels Van Och Date: Sat, 7 Nov 2015 12:07:28 +0100 Subject: 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. --- docs/ref/django-admin.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/ref') 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 + +.. 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 [ []] ------------------------------------------ -- cgit v1.3