One, the Django framework
1. HTTP encapsulates the entire process of a Web service. Consists of two parts: request and Response (response).
The requested content is a URL (the path to the document). The response is mainly the body and the corresponding header (header)
2. Data store database definition and Query database language SQL (Structured Query language) map to object-oriented language code object ORM (Object Relational mapping)
3, means: template rendering into HTML and other formatting methods: CSS (cascading style sheets) javaScript (browser-side function)
4, Summary: the underlying HTTP database storage data such as HTML display
5. Interactive mode
MVC (model, view, controller)
Model--View--templates
At the bottom of the model, the abstract view is linked to the URL, and the returned Response object template is controlled to display the returned object
Second, the model
1. ORM links the database with the Python object.
Django uses a Python class to represent objects, objects that map to SQL tables, and properties for objects that are columns in a table.
Charfield (fixed length) and TextField (indefinite length) Save text
Emialfield Urlfield Ipaddressfield
Filefield saving file paths in the database
2, primary key and uniqueness This chapter did not read ^_^!!!
3, foreign key?
django1.8.3 Build Blog--2 Django Web Development Guide Read notes