django1.8.3 Build Blog--2 Django Web Development Guide Read notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.