Last Updated : 12 Jul, 2025
Django follows the MVT (Model-View-Template) architectural pattern, which is a variation of the traditional MVC (Model-View-Controller) design pattern used in web development. This pattern separates the application into three main components:
1. ModelModel acts as the data layer of your application. It defines the structure of your database and handles data-related logic. It typically represents your database tables and is responsible for querying, inserting, updating, and deleting data. Django models are usually backed by relational databases like MySQL, PostgreSQL, SQLite, etc.
2. ViewTo check more, visit - Django Models
View handles the business logic and user interface rendering. It processes user requests, interacts with models to fetch data, and passes that data to templates for display. In Django, views are Python functions or classes that return HTTP responses.
3. TemplateTo check more, visit - Django Views.
Template is responsible for presenting the data to the user. It contains the static parts of the HTML and special template syntax (like Django Template Language) to dynamically insert data. Templates usually consist of HTML, CSS, and JavaScript.
Project StructureTo check more, visit - Django Templates
A Django Project when initialized contains basic files by default such as manage.py, view.py, etc. A simple project structure is enough to create a single-page application.
Here are the major files and their explanations. Inside the geeks_site folder ( project folder ) there will be the following files:
Explanation of Key Files and Folders1. manage.py: This file is used to interact with your project via the command line(start the server, sync the database... etc). For getting the full list of commands that can be executed by manage.py type this code in the command window-
$ python manage.py help
2. folder ( geeks_site ): This folder contains all the packages of your project. Initially, it contains four files -
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4