aircraft
aircraft

Reputation: 26924

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:

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.

Upvotes: 0

Views: 2447

Answers (1)

Exprator
Exprator

Reputation: 27543

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

Upvotes: 1

Related Questions