summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2010-12-12 23:03:24 +0000
committerJannis Leidel <jannis@leidel.info>2010-12-12 23:03:24 +0000
commit05eb53603c69b46b70226bfdb2242732b2b169fa (patch)
treed9e6d141f9cfccbcdbf11a33ce2941a7d4a6012d /django
parent47a5153da4216db4a4262047c513450a2a154d62 (diff)
Fixed #14187 -- Added support for bpython to shell management command. Thanks, Jeremy Dunck.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14896 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/core/management/commands/shell.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/django/core/management/commands/shell.py b/django/core/management/commands/shell.py
index f08de4e892..e4ce462c20 100644
--- a/django/core/management/commands/shell.py
+++ b/django/core/management/commands/shell.py
@@ -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 @@ class Command(NoArgsCommand):
# IPython not found at all, raise ImportError
raise
+ def bpython(self):
+ import bpython
+ bpython.embed()
+
def run_shell(self):
for shell in self.shells:
try: