What does Django look like?

Django is a Web application framework (Django’s main purpose: easy and fast development of database-driven web sites).

() 1.1) Process: Request: User ==== HTTP Server (Computer) === web Framework (Django) === "Database request processing completed Response: Database ===" Web framework (Django) === "HTTP server (computer) ===" User response completed (2) Introduction: HTTP server: Used to accept user requests and forward them to the Web application framework for processing. The Web application framework then sends it to the HTTP server, which then returns it to the user.Copy the code

In short, we ask the browser for www.baidu.com (note: Baidu’s IP and port number are bound to the URL) and the browser returns us baidu’s home page. This is what the Web framework does. (The corresponding HTTP server can be found through the IP address. The specific application can be found through the port.)

2. Tools:

(1) Tools used:

(2) Create virtual environment in Ubuntu:

(1To see what virtual environments are currently available:2Python interpreter in Ubuntu: which specifies the python3 version custom virtual environment name (3) to create a virtual environment, run mkvirtualenv -p /usr/bin/ python3 dj_test (4Workon dj_test (workon dj_test)5To exit the virtual environment: deactivate (6To delete a virtual environment: rmVirtualenv dj_test1PIP install Django ==2.14.2) Check the third-party library PIP in the current Python environmentlist

Copy the code