Project environment to build
First, create a django project
Create a python virtual environment on a virtual machine, because the actual deployment of the project, it is linux
mkvirtualenv -p /usr/bin/python3.6 tzproject
2. Create a django project
1. Install django
Choose to install the latest version django2.1.x 2.1.10
pip install django==2.1.10
2. Create a django project
~ cd / Project / # cd to where you want to put django project path django-admin startproject tzproject
3. Create a project pycharm
By remote project pycharm connected virtual machines, development.
1. Select the project directory
Select the directory you want to store the project file, pay attention to the root directory of pycharm django project and the project must be consistent, do not use a pycharm project, managing multiple django project.
2. Configure Remote Interpreter
Configure the virtual interpreter just created
4.pycharm Configure Django project
After Codes, you need to be configured to project in the Project django pycharm in order to use a variety of convenient pycharm prompts.