Building a project process from scratch in Python

One, the requirement is to create a project named Beauty Makeup on the desktop

1)cd desktop 

2) mkdir meizhuang_server

3) Install the virtual environment pipenv --python3.6

4) Enter the virtual environment pipenv shell At this point, two files pipfile and pipfile.lock will be generated in meizhuang_server

5) Install Django: django-admin startproject meizhuang At this point, the meizhuang folder is generated under meizhuang_server

6) cd meizhuang into the folder of manage.py

7) Execute the command ./manage.py startapp home1 to generate the home1 app

8) Open pycharm to start configuring the virtual environment, open meizhuang under meizhuang_server

9) commod +, shortcut key to open pefrence, set project, double-click to select project interpreter, enter and select virtual environment, if not, click local add, go to machion--virtualenvs to find the virtual environment folder of the corresponding project name, then click below bin select Python  

10) Click setting.py, go in to modify the language and time zone, and set them as

LANGUAGE_CODE = 'zh_Hans'
TIME_ZONE = 'Asia/Shanghai' 

This step is basically completed


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325208291&siteId=291194637