mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user