DEV Community

Cover image for Why Django? - MVT Model
Lakshgupta
Lakshgupta

Posted on

Why Django? - MVT Model

Django is a framework easy to adopt with the frontend where python settling the backend of a fullstack website. Easy designs add ups with the help of HTML, CSS, JS. Django is easy to integrate at both the frontends and backends..

Other than the basics, Django follows the MVT Model at its core:
Enter fullscreen mode Exit fullscreen mode

Models:

Defined as an entities to work with while crating the website. Basically call it a entities of the flow we create of a software.
Blueprints are declared before hand withe the help of Django Models.

Eg: Created a user based website where employees interacted with the website. Roles were of a Employee and a Employer. Models were defined before hand and for the ease of further development some day.

Views:

Defined as the work which will be done with certain entities. Views can be called as functions in layman's language. Certain sections are associated with these views and provides the user full functionality with much more ease. Views are triggered upon interaction with the users.

Eg: Employee Log-in Log-out will count as a view. Certain groups of UI will trigger such functionalities which is declared in the views itself.

Templates:

Defined as the different page styles or basic html pages in layman's language. Templates comprises of the html formatted tags with the add of jquery based functionalities triggering and the css styling. Certain Views trigger the separate templates defined within this frame.

Eg: Separate Log-in page for employee and employer for separate user experience and separate functionalities defined before hand with the models defined.

Top comments (0)