cannot open manage.py after installing django

后端 未结 13 1235
暗喜
暗喜 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条回答
  •  萌比男神i
    2021-02-04 12:01

    you need to change your directory to the directory of the project.

    1. open your environment by typing activate environment_name
    2. change the directory to the folder in which you want to create the project by cd Folder_Name
    3. then create your project by django-admin startproject Project_Name
    4. then change the directory to your project folder
    5. if you also want to create an app then typepython manage.py startapp App_name
    6. to confirm if it works type python manage.py runserver, then you should get a link in the terminal. copy and paste that link in the browser and you should see a successful page.

提交回复
热议问题