Django MVC&&MTV

MTV and MVC
Here Insert Picture Description
before talking mvc, we first look at a problem we have encountered, go to the company to find their friends work, you first have to know your friend's company, then it encountered a sister foreground, front sister tell you, your friends in the development department, and then you find your friend, and then start to deal with things, specific things will you be processed by your friends, during the processing of your friends to call their company. resources.

The same as when you request Web site, when we request to the server, the server passes the request to a specific function to process the request, in web development we call the controller control (corresponding to the above-sister). When the specific function processing, data is required, then the content associated with the data model we call model (corresponding to the above corporate resources). Finally, the data to fill the page returned to the browser presented. We call this view view.
Here Insert Picture Description

Django framework according to the MVC pattern can be divided into the form of FIG.
But the Django framework draws on MVC design, the entire framework will be divided into three parts
Model (model), Template (template) and the View (view), which is the MTV design.

Guess you like

Origin blog.csdn.net/qq_39062888/article/details/89526112