当我试图发出命令使用ipython运行Django shell时,它会提示输入帮助:
$ ipython manage.py shell
Type 'manage.py help <subcommand>' for help on a specific subcommand.
Available subcommands:
[auth]
changepassword
createsuperuser
[contenttypes]
remove_stale_contenttypes但是,我知道ipython能够运行一个模块
cat expriment.py
print("run it with ipython")
ipython experiment.py
run it with ipython为什么ipython不能运行manage.py
发布于 2018-05-24 10:18:46
我不知道为什么它不能按照问题中的方式运行,但是我可以说django扩展包将允许您使用ipython shell。它还添加了许多其他非常有用的内容,特别是分析和调试器,在您的浏览器中具有交互式的跟踪功能。
尝试:
pip install django-extensions
... add to config per instructions linked below ...
python manage.py shell_plus —ipython在这里阅读更多http://django-extensions.readthedocs.io/en/latest/index.html
发布于 2018-05-24 09:44:11
您尚未在您的ipython中安装virtualenv。
要么将其安装在您的virtualenv中,要么
用途:
python manage.py shell -i ipythonhttps://stackoverflow.com/questions/50505436
复制相似问题