Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何更改django manage.py默认shell_Python_Django_Shell_Anaconda_Ipython - Fatal编程技术网

Python 如何更改django manage.py默认shell

Python 如何更改django manage.py默认shell,python,django,shell,anaconda,ipython,Python,Django,Shell,Anaconda,Ipython,我刚刚安装了Anaconda,在执行以下命令后,最烦人的是: python manage.py shell 使用IPython外壳。我想把它改回默认的Python发行版。我正在使用VisualStudio代码,并且已经将其解释器更改为默认的python 3.6。而且 python 命令运行正常的python发行版,Visual Studio和普通cmd终端中都存在此问题。Django 1.10+: python manage.py shell --interface python Djan

我刚刚安装了Anaconda,在执行以下命令后,最烦人的是:

python manage.py shell
使用IPython外壳。我想把它改回默认的Python发行版。我正在使用VisualStudio代码,并且已经将其解释器更改为默认的python 3.6。而且

python
命令运行正常的python发行版,Visual Studio和普通cmd终端中都存在此问题。

Django 1.10+:

python manage.py shell --interface python
Django<1.10:

python manage.py shell --plain

我不知道你是否用过shell_plus

安装django扩展
,然后使用
python manage.py shell\u plus

shell plus是一个非常好的工具

您可以使用shell/shell\u plus来创建一个简单的界面

python manage.py shell_plus --plain

注意:-不建议在prod版本中使用django扩展。但我相信您会喜欢shell_plus,因为这将减少导入所有型号的麻烦。

我知道这个答案,只是我更喜欢使用原装shell。至少要知道如何在“原始”、“水蟒”和“贝壳加贝壳”之间切换。