Django is often referred to as an MTV framework (Django MTV ) , where MTV works parallelly to develop a full stack web application. You can see the basic idea of MTV in diagram below:
Model: M stands for Model. Model is an data access layer , where the application’s data stored . Basically django comes equipped with SQLlite whi ch is light weighted database, and is sufficient to stores application’s data. But if in case , other database required, then django can connect to a variety of SQL engine backends. In project’as settings.py file you can edit the ENGINE parameter used for Databases.
Django models created in app’s models.py file and then connected to the original database with admin.py file, we will briefly discuss about eeverything about models in further articles, But for now you can say that Model is an core part of MTV which which knows everything about data , how to access it, how to validate it, which behaviors it has, and the relationships between the data and all.
Template: T stands for template. It is an presentational layer which actually provide interface to the user. It contains everything about how data will show to user. It contains all the key parts of an web-page like colors, animations etc. As django provides an structured web-development process , templates stored in template folder which contain html files, Template further connected with Static files which are stored in Static folder . static folder may contain html, css, bootstrap, font, image files. All the connectivities to the static , template to the views are provide by the settings.py file. We will practically discuss all about that in further sections but for now you can say Template actually decides , what and how should something displayed on a web page.
View: V stands for view. Views is an business logic layer. It contain actual logic to access the models and delivered to the template. As django is written in python, logics are also in the python (functions, classes, loops etc). These logics occurs in app’s views.py file. In simple words we can say that View is an interface between template and models, which delivers data from models to template.
It is sufficient to understand MTV . For developing a full stack website, one should know all about how to connect Model Template and Views. In summary we can say Model contains database, Template contains html, css files and view contain python files.