- Django - AJAX
- Django - RSS
- Django - Comments
- Django - Caching
- Django - Sessions
- Django - Cookies Handling
- Django - Apache Setup
- Django - File Uploading
- Django - Form Processing
- Django - Generic Views
- Django - Sending E-mails
- Django - Page Redirection
- Django - Models
- Django - Template System
- Django - URL Mapping
- Django - Creating Views
- Django - Admin Interface
- Django - Apps Life Cycle
- Django - Creating a Project
- Django - Environment
- Django - Overview
- Django - Basics
- Django - Home
Django Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Django - Overview
As you already know, Django is a Python web framework. And pke 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 apppcations 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.
to know more.DJANGO MVC - MVT Pattern
The Model-View-Template (MVT) is spghtly 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 −
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.
Advertisements