Apo*_*los 11 python django pycharm
我有以下目录树
myproject
??? data
??? libs
??? wsgi
??? openshift
??? static
Run Code Online (Sandbox Code Playgroud)
openshift包含设置文件和manage.py文件.我想通过pycharm来管理manage.py但是它不起作用,runserver命令和startapp都没有任何准确性.
运行startapp会给我以下错误
bash -cl "/usr/bin/python2.7 manage.py startapp quiz"
/usr/bin/python2.7: can't open file 'manage.py': [Errno 2] No such file or directory
Process finished with exit code 2
Run Code Online (Sandbox Code Playgroud)
运行runserver它给了我以下内容
ImportError: Could not import settings 'openshift.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named openshift.settings
Process finished with exit code 1
Run Code Online (Sandbox Code Playgroud)
我启用了django支持并将wsig设置为django root项目.从终端运行manage.py工作正常.
我究竟做错了什么?
编辑:从pycharm运行manage.py shell也可以运行EDIT2:我设法通过跟随openshift的结构并使openshift成为django项目根文件夹并对导入进行一些编辑来实现它.现在一切都很好
Aid*_*tis 16
打开myproject作为你的项目,然后转到PyCharm - > Preferences ... - > Django,启用Django支持,然后选择你的Django项目根目录,设置文件和管理脚本.
归档时间: |
|
查看次数: |
16811 次 |
最近记录: |