0

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:

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.

I find the stack overflow, there is some the same error, but they are not when creating app occurs.

2
  • Don't put your code under /tmp, it'll be wiped the next time you restart your machine. Commented Jun 21, 2017 at 8:25
  • @DanielRoseman Ok, thanks your advice,and by the way. If I create a project named testPro, you know it will generate the /testPro/testPro like this directory hierarchy, and if I create the APP, should I under the /testPro or /testPro/testPro? I am not sure. Commented Jun 21, 2017 at 8:28

1 Answer 1

1

i guess you are using django app,

so first

pip install django
django-admin startproject project_name
django-admin startapp app_name

python manage.py runserver
Sign up to request clarification or add additional context in comments.

1 Comment

Yes, yes, thank you, the tutorial is python manage.py I don't know why.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.