Chapter-3

What  is MVT

3.1. Model View Template (MVT) :-

The MVT is an design pattern that separates an application into three main logical components ModelView, and Template.

3.2. Model :-

The Model responsible to handle database. It is a data access layer which handles the data.

3.3. View :-

The user can send request by interacting with template, the view handles these requests and sends to Model then get appropriate response from the Model, sends response to template. 

3.4. Template :-

It represents how data should be presented to the application user. User can read or write the data from template. 

Basically it is responsible for showing end user content, we can say it is user interface. It may consists of HTML, CSS, JS mixed with Django Template Language. 

3.5. Why Use MVT :- 

  • Organized Code
  • Independent Block
  • Reduce the complexity of web application
  • Easy to maintain
  • Easy to modify

PreviousNext