(3) Build Django:

Step 1: Create a Django project using PyCharm:

1. Create a Django project:

2. Specify the Python interpreter for a Django project in a virtual environment created remotely:

3. Configure port forwarding for Ubuntu (add port 1234) :

Step 2: Do some basic configuration on your new Django project!!

(1) Change the upload mode to CTRL + S to save the upload mode:

First select Tools>Devloyment> Options and then CTRL + S to save the upload

(2) Basic parameter configuration:

Select Tools > Devloyment > Configuration

Note that the remote project storage path is concatenated with the root path in the previous connection

(3) Set who can access this Django project (two steps!)

Step 1: The address of the client that is allowed to access. The “*” indicates any IP address The second step:First of all:And then:

(4) Enter in the local browser to find Django is ok!!

(5) Project Catalog and Document Description:

(6) Relationship between project and App:

The new APP:

(7) create view function :(do business logic operation)

1. Create the views.py function in the project directory.

2. Define the URL of the view.

3. After the service starts, enter:

IP address: port 8000 /hello, you can see “Hello Django” in the page!