我想获得一个带有代码的交互式外壳,但是我什至不知道这样的事情是否存在。现在有人可以帮助我吗?
编辑:
我已经知道我们可以使用python manage.py shell,但是我希望我们可以在代码中插入一些东西,而不必在外壳中重新导入所有库。
此命令将帮助您加载所有软件包。
python manage.py shell_plus
Run Code Online (Sandbox Code Playgroud)
参考链接http://django-extensions.readthedocs.io/en/latest/index.html
尝试使用https://docs.djangoproject.com/en/1.10/ref/django-admin/#shell
django-admin shell
Run Code Online (Sandbox Code Playgroud)
或者
python manage.py shell
Run Code Online (Sandbox Code Playgroud)