From f1628f6be1b8113b5e53aea497b2f6c47180e83f Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 13 Dec 2015 11:33:39 -0800 Subject: Fixed #25838 -- Added "python" as an interface to the shell command. Deprecates the "--plain" option. --- docs/internals/deprecation.txt | 2 ++ docs/ref/django-admin.txt | 16 +++++++++++----- docs/releases/1.10.txt | 6 ++++++ 3 files changed, 19 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 5fe2e142fb..d0bafdaafe 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -126,6 +126,8 @@ details on these changes. * ``django.utils.functional.allow_lazy()`` will be removed. +* The ``shell --plain`` option will be removed. + .. _deprecation-removed-in-1.10: 1.10 diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index d7798e559a..31da49cfc5 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -933,9 +933,15 @@ Starts the Python interactive interpreter. Django will use IPython_ or bpython_ if either is installed. If you have a rich shell installed but want to force use of the "plain" Python interpreter, -use the ``--plain`` option, like so:: +use the ``-i python`` or ``--interface python`` option, like so:: - django-admin shell --plain + django-admin shell -i python + django-admin shell --interface python + +.. deprecated:: 1.10 + + In older versions, use the ``--plain`` option. This is deprecated and will + be removed in Django 2.0. If you would like to specify either IPython or bpython as your interpreter if you have both installed you can specify an alternative interpreter interface @@ -957,12 +963,12 @@ bpython:: .. _bpython: http://bpython-interpreter.org/ When the "plain" Python interactive interpreter starts (be it because -``--plain`` was specified or because no other interactive interface is -available) it reads the script pointed to by the :envvar:`PYTHONSTARTUP` +``--interface python`` was specified or because no other interactive interface +is available) it reads the script pointed to by the :envvar:`PYTHONSTARTUP` environment variable and the ``~/.pythonrc.py`` script. If you don't wish this behavior you can use the ``--no-startup`` option. e.g.:: - django-admin shell --plain --no-startup + django-admin shell --interface python --no-startup showmigrations [ []] ------------------------------------------ diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index 7b360948a7..6276f2e102 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -212,6 +212,9 @@ Management Commands * :djadmin:`makemigrations` now displays the path to the migration files that it generates. +* The :djadmin:`shell` ``--interface`` option now accepts ``python`` to force + use of the "plain" Python interpreter. + Migrations ^^^^^^^^^^ @@ -432,6 +435,9 @@ Miscellaneous :func:`~django.utils.functional.keep_lazy` function which can be used with a more natural decorator syntax. +* The ``shell --plain`` option is deprecated in favor of ``-i python`` or + ``--interface python``. + .. _removed-features-1.10: Features removed in 1.10 -- cgit v1.3