mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #25838 -- Added "python" as an interface to the shell command.
Deprecates the "--plain" option.
This commit is contained in:
parent
b10f66831b
commit
f1628f6be1
4 changed files with 70 additions and 54 deletions
|
@ -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
|
||||
|
|
|
@ -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 [<app_label> [<app_label>]]
|
||||
------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue