我的 ipython 配置文件没有被 django_extensions 的 shell_plus 加载。
我的 ipython 配置文件包含:
c.InteractiveShellApp.exec_lines = ['aa=5',]
测试它:
(virtualenv) $ ipython
>>> ....
In [1]: aa
Out[1]: 5
作品。现在,测试通过 django_extensions 调用的 ipython:
(virtualenv) $ python manage.py shell_plus
这让我进入 ipython(突出显示作品,%run 作品等),但没有加载我的配置:
In [1]:aa
NameError: name 'aa' is not defined
我怎样才能让它工作?