cannot open manage.py after installing django

后端 未结 13 1058
暗喜
暗喜 2021-02-04 11:23

I have a problem in setting up django.

My situation: I have Anaconda Python 2.7 in my Windows 8 computer. On the Anaconda command prompt window, I type: pip instal

13条回答
  •  误落风尘
    2021-02-04 12:08

    You're not in the proper directory...In the case you described, you should have:

    1. mkdir newproject (not sure why you're doing this...but we'll continue with it)
    2. cd newproject
    3. django-admin.py startproject newproject
    4. cd newproject ← A key missing part from what you did. You need to change into the directory where manage.py resides. Verify it by using ls at the command prompt after switching into the directory.
    5. python manage.py runserver

    Use ls often, if you need, to double check where you are in the directory tree.

提交回复
热议问题