[英]python: can't open file 'manage.py' when I create django app
I created a project named testdj, and under the directory /tmp/python-test/testdj/testdj/
, I want to create a django app, so I use the below command: 我创建了一个名为testdj的项目,并且在目录/tmp/python-test/testdj/testdj/
,我想创建一个Django应用,因此我使用以下命令:
aircraftdeMacBook-Pro:testdj ldl$ python manage.py startapp TestModel
python: can't open file 'manage.py': [Errno 2] No such file or directory
But the the upper error, can't open file 'manage.py'
there. 但是上面的错误, can't open file 'manage.py'
此处can't open file 'manage.py'
。
I find the stack overflow, there is some the same error, but they are not when creating app occurs. 我发现堆栈溢出,有一些相同的错误,但是创建应用程序时却没有。
i guess you are using django app, 我猜你正在使用django应用程序,
so first 所以首先
pip install django
django-admin startproject project_name
django-admin startapp app_name
python manage.py runserver
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.