Skip to content
Browse files

Fixed #14187 -- Added support for bpython to shell management command…

…. Thanks, Jeremy Dunck.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 47a5153 commit 05eb53603c69b46b70226bfdb2242732b2b169fa @jezdez jezdez committed
Showing with 9 additions and 4 deletions.
  1. +5 −1 django/core/management/commands/
  2. +4 −3 docs/ref/django-admin.txt
6 django/core/management/commands/
@@ -8,7 +8,7 @@ class Command(NoArgsCommand):
help='Tells Django to use plain Python, not IPython.'),
help = "Runs a Python interactive interpreter. Tries to use IPython, if it's available."
- shells = ['ipython']
+ shells = ['ipython', 'bpython']
requires_model_validation = False
def ipython(self):
@@ -28,6 +28,10 @@ def ipython(self):
# IPython not found at all, raise ImportError
+ def bpython(self):
+ import bpython
+ bpython.embed()
def run_shell(self):
for shell in self.shells:
7 docs/ref/django-admin.txt
@@ -747,13 +747,14 @@ shell
Starts the Python interactive interpreter.
-Django will use IPython_, if it's installed. If you have IPython installed and
-want to force use of the "plain" Python interpreter, use the ``--plain``
-option, like so::
+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:: shell --plain
.. _IPython:
+.. _bpython:
sql <appname appname ...>

0 comments on commit 05eb536

Please sign in to comment.
Something went wrong with that request. Please try again.