Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
MVT | Models
Django: Build Your First Website
course content

Contenido del Curso

Django: Build Your First Website

Django: Build Your First Website

1. Get Started
2. The First Application
3. Models
4. CRUD Operations
5. Templates
6. Forms and Dynamic URLs

bookMVT

Model View Template

The MVT (Model View Template) is a software design pattern. It is a collection of three important components Model, View, and Template:

  • Model: The Model represents the data of your web application. It's like a container that holds information. For example, if you have a website about books, the Model would hold details such as the book's title, author, and publication date;
  • View: The View is like a middleman between the Model and the user. It takes the data from the Model and decides how to present it to the user. It's responsible for showing the information in a way that makes sense. For instance, the View would take the book's details from the Model and display them nicely on a webpage;
  • Template: The Template is all about the visual part of your web application. It's like a blueprint or a design for how the webpage should look. The Template works together with the View to take the data from the Model and put it in the right places on the webpage.

The user sends an HTTP request to a specific URL. The server receives this request and processes it by retrieving the HTML template, which serves as the page's display in the browser, and data from the model. The server returns an HTTP response to the user, passing the data from the model (+ any additional data) and the template for rendering, which serves as the interface for the user.

MVT is it?

MVT is it?

Selecciona la respuesta correcta

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 1
some-alt