Hello Django, the architecture of Django.

Gigil Jacob
2 min readSep 30, 2023

--

Django, a framework of Python is used for developing websites, web portals, or other related kinds of stuff. It follows MVT architecture which which is the abbreviation of Model View Template and it has been represented in the diagram below.

Fig 1: Model View Template(MVT) Architecture

In order to fully understand the MVT architecture it is good to know about the response cycle using Django.

Model: The model describes how the data should be stored in the database. This is the portion where we would detail the structure of the database like the fields and their types. So that Django handles the communication between the model and database whichever we are using for our project.

View: The view part is where we define the business logic. It accepts the web request, processes some computational or other related operational stuff over here, and then returns its corresponding response. The view is a part of the user interface as it would be rendering responses as HTML, XML, JSON, etc…

Template: If you ask where the static contents are loaded in an MVT architecture then the name template comes into play. Every type of static file like HTML, JS, Jquery, CSS, and others is configured over here. In the settings.py file, where the configuration is defined, we set the directory to static. And the template engine renders everything to give out a beautiful front-end design.

--

--