1. Submitted To
Dr. Yashpal Singh
HEAD (Computer Science &
Engg.)
B.I.E.T. Jhansi
Submitted By
Yokesh
Computer Science &
Engg.
(3rd Year)
Roll No - 14043100601
2. CONTENTS
1) What is Django ?
2) What is MTV ? Difference b/w MTV and
MVC?
3) Models , Templates and Views
4) Installation of Django
5) Creating Project ,Apps & Folder Structure
6) Django Database API
7) Advantages
8) Conclusion
2
3. What is Django ?
1. It is a free and open-source web framework,
written in Python, which follows the model-view-
template (MVT) architectural pattern.
2. It is maintained by the Django Software
Foundation (DSF).
3. Django is a high-level Python web framework that
encourages rapid development and clean,
pragmatic design.
4. Django makes it easer to build better web apps
quickly and with less code.
3
4. What is MVT ?
“It is basically an combination of model , template
and view clubbed together for developing a web
project in a new modular approach. “
4
5. Difference b/w MTV and MVC?
M stands for “Model,” the data access layer.
T stands for “Template,” the presentation layer.
V stands for “View,” the business logic layer and
MVT Architecture
M stands for “Model,” the data access layer.
V stands for “View,” the presentation layer.
C stands for “Controller, ” the business logic layer.
MVC Architecture
5
6. Models , Templates and Views
Model A model is a class that represents table
or collection in our DB, and where every attribute
of the class is a field of the table or collection.
They essentially , define your database layout,
with additional metadata.
6
7. View This is the portion of the framework
describes the logic which is to be followed when a
user hits any particular url.
Models , Templates and Views
Urls.py
Views.py
7
8. Models , Templates and Views
Template The UI part ,or the visible part
8
9. Installation & Folder Structure
1. Creation of Virtual environment
2. Moving into virtualenv and starting the djangoproject
3. Now we have the following Project directory structure
9
10. Installation & Folder Structure
4. Creating an app and adding the app to the setting.py file
5. App Directory Structure
6. Running the Server
10
11. Django Database API
Running the interactive database API shell
Performing Operations on Models
Creation of new entry in the model
Filtering out entries from a particular model
Support For various Databases Like
PostgreSQL
Oracle
SQLite3
11
12. Advantages
1)Object-Relational Mapping (ORM) Support: Django
rovides a bridge between the data model and the
database engine, and supports a large set of
database systems including MySQL, Oracle, Postgres,
etc.
2)Multilingual Support: Django supports multilingual
websites through its built-in internationalization
system. So we can develop our website, which would
support multiple languages.
12
13. Advantages
3)Administration GUI: Django provides a nice ready-to-
use user interface for administrative activities.
4)Development Environment: Django comes with a
lightweight web server to facilitate end-to-end
application development and testing.
13
14. Who uses Django ??
Nasa official website
Bitbucket
Pinterest
Spotify
Instagram
14
15. Conclusion
Although Today we are having a large no of
available framework to choose from for web
development ,Django takes cares of all the
security aspects the users has to not worry
about the different attacks. The inbuilt Database
api is really very handy because it gives us an
total overview before implementing actual logic
what we are doing so it is too much helpful.
15