Easy Tutorial
❮ Django Orm 3 Home ❯

Introduction to Django

Basic Introduction

Django is an open-source web application framework written in Python.

Using Django, Python developers can easily accomplish most of the content required for a formal website with minimal code and further develop fully functional web services. Django itself is based on the MVC model, which stands for Model + View + Controller design pattern. This MVC pattern simplifies subsequent modifications and extensions to the program and allows for the reuse of certain parts of the program.

MVC Advantages:

Python combined with Django is the best combination for rapid development, design, and deployment of websites.

Features


MVC and MTV Models

MVC Model

The MVC pattern (Model-view-controller) is a software architectural pattern in software engineering that divides the software system into three basic parts: Model, View, and Controller.

MVC connects in a plug-in and loosely coupled manner.

Simplified Diagram:

User Operation Flowchart:


MTV Model

Django's MTV pattern is essentially the same as MVC, aiming to maintain loose coupling between components, with only slight differences in definition. Django's MTV stands for:

In addition to these three layers, there is also a URL dispatcher, which is responsible for routing page requests for individual URLs to different Views for processing. The View then calls the appropriate Model and Template. The response pattern of MTV is as follows:

Simplified Diagram:

User Operation Flowchart:

Explanation:

When a user makes a request (request) through their browser to our server, this request accesses the view function:

The view function fills the returned data into the template's placeholders and finally returns the webpage to the user.

Reference Address:

❮ Django Orm 3 Home ❯