Django - Overview


Advertisements

As you already know, Django is a Python web framework. And like most modern framework, Django supports the MVC pattern. First let's see what is the Model-View-Controller (MVC) pattern, and then we will look at Django’s specificity for the Model-View-Template (MVT) pattern.

MVC Pattern

When talking about applications that provides UI (web or desktop), we usually talk about MVC architecture. And as the name suggests, MVC pattern is based on three components: Model, View, and Controller. Check our MVC tutorial here to know more.

DJANGO MVC - MVT Pattern

The Model-View-Template (MVT) is slightly different from MVC. In fact the main difference between the two patterns is that Django itself takes care of the Controller part (Software Code that controls the interactions between the Model and View), leaving us with the template. The template is a HTML file mixed with Django Template Language (DTL).

The following diagram illustrates how each of the components of the MVT pattern interacts with each other to serve a user request −

DJANGO MVC - MVT Pattern

The developer provides the Model, the view and the template then just maps it to a URL and Django does the magic to serve it to the user.

Useful Video Courses


Video

Build a Stock Market Web App With Python and Django

39 Lectures 3.5 hours

John Elder

Video

Build A Flashcard Website With Python and Django

36 Lectures 2.5 hours

John Elder

Video

Build a Weather App With Python and Django

28 Lectures 2 hours

John Elder

Video

Build An API With The Django Rest Framework Using Python

20 Lectures 1 hours

John Elder

Video

Build A Dental Website With Python and Django

35 Lectures 3 hours

John Elder

Video

Build Python Django Real Project: Django Web Development

Most Popular

79 Lectures 10 hours

Rathan Kumar

Advertisements