mirror of https://github.com/django/django.git
Fixed #17078 -- Made shell use std IPython startup.
This allows for a behavior more in line with what is expected by Ipython users, e.g. the user namespace is initialized from config files, startup files. Thanks Benjamin Ragan-Kelley from the IPython dev team for the patch.
This commit is contained in:
parent
9180146d21
commit
3570ff734e
|
@ -19,8 +19,10 @@ class Command(NoArgsCommand):
|
||||||
|
|
||||||
def ipython(self):
|
def ipython(self):
|
||||||
try:
|
try:
|
||||||
from IPython import embed
|
from IPython.frontend.terminal.ipapp import TerminalIPythonApp
|
||||||
embed()
|
app = TerminalIPythonApp.instance()
|
||||||
|
app.initialize(argv=[])
|
||||||
|
app.start()
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# IPython < 0.11
|
# IPython < 0.11
|
||||||
# Explicitly pass an empty list as arguments, because otherwise
|
# Explicitly pass an empty list as arguments, because otherwise
|
||||||
|
|
Loading…
Reference in New Issue