SlideShare a Scribd company logo
Django is a high-level Python Web framework that 
encourages rapid development, pragmatic design and follows 
DRY principles. 
By Abhijeet Shekhar 
Blog: http://ashekhar.wordpress.com
Features 
• Legacy DB 
• Test Framework 
• Multi- DB 
• Geodjango 
• Aggregation 
• JSON Serializer 
• Stable API Promise 
• Fantastic Docs 
• Generic View 
• Template Inheritance 
• Template Filters 
• Humanize 
• Runs on Jython /Iron 
Python 
• Google App Engine
Architecture
Component Architecture
Django is MTV/MVP framework 
-Model 
(app/models.py 
-Template 
( app/templates/*.html) 
-View (app/view.py)
Project Structure 
-project= the full website 
app=python library 
-Sample 
--__init__.py 
--settings.py 
--urls.py 
--wsgi.py 
-app-1 
--_init_.py 
--admin.py 
--models.py 
--tests.py 
--urls.py 
--view.py 
-app-2 
template/ 
manage.py 
env/ 
readme
Environment setup and installation 
Standard installation: 
• Content will be stored in the default location of 
python 
Virtual installation: 
• All dependent library can be installed in the virtual 
environment. 
• one project will be one virtualenv. 
• Every project with different dependencies in terms 
of libraries and version. 
• Easier to deploy and forget dependency 
• Virtualenvwrapper is a convenient
Steps to create a project 
• Create a project 
• Start an application 
• Create your database(Mysql, Post gre) 
• Configure DB settings in settings.py 
• Define your models 
• Add external modules 
• Add your template 
• Write your view 
• Create url mappping 
• Test application 
• Deploy application (linux apache , mod 
python
Initialize Your Project 
$ django-admin.py startproject <project_name> 
$ cd <project_name> 
$ Python manage.py startapp my 
$ edit settings.py and set DB info 
$ python manage.py runserver 
Browse http://localhost:8000
Settings: 
-multiple setting files: 
-per environment: dev, testing, staging , 
Production Per developer (local settings, 
use the host name ) 
-all setting file must inherit from , so you can do 
INSTALLED_APPS +=(‘debug_toolbar’) 
-version control all the setting !
Fat models, thin viewer… 
-multiple setting files: 
-per environment: dev, testing, staging , production 
Per developer (local settings, use the host name ) 
-all setting file must inherit from , so you can do 
INSTALLED_APPS +=(‘debug_toolbar’) 
-version control all the setting !
Debugging 
- ipython (./mange.py shell) 
- Ipdb 
- Import ipdb 
- Ipdb.set_trace() 
- django-debug-toolbar 
- very powerful 
- use it to optimze db performance, view by view
Migration 
- South/migrate: 
- Intelligent schema & data migrations for 
Django 
- Can do backward migrations
Deployment 
Web server 
- Niginx/Apache 
- wsgi 
- mod_python 
Static server 
- Nginx or any CDN
Thanks 

More Related Content

PDF
Understanding react hooks
PPTX
Intro to React
PPTX
Introduction to angular with a simple but complete project
PPT
Introduction to Javascript
PPT
Angular Introduction By Surekha Gadkari
PDF
React js
PDF
introduction to Vue.js 3
PPTX
ReactJS presentation.pptx
Understanding react hooks
Intro to React
Introduction to angular with a simple but complete project
Introduction to Javascript
Angular Introduction By Surekha Gadkari
React js
introduction to Vue.js 3
ReactJS presentation.pptx

What's hot (20)

PPTX
React-JS Component Life-cycle Methods
PDF
Basics of React Hooks.pptx.pdf
PDF
TypeScript - An Introduction
PPTX
Angular overview
PPTX
Introduction to React JS for beginners | Namespace IT
PDF
TypeScript Introduction
KEY
Introduction to Django
PPTX
Basics of Vue.js 2019
PPTX
React workshop
PPTX
Django Framework Overview forNon-Python Developers
PPTX
Introduction to spring boot
PPTX
Angular Data Binding
PPTX
Angularjs PPT
PDF
Page Object Model and Implementation in Selenium
PPTX
Typescript Fundamentals
PPTX
React JS - A quick introduction tutorial
PPTX
React hooks
PPTX
Asp.net file types
PDF
Angular Dependency Injection
React-JS Component Life-cycle Methods
Basics of React Hooks.pptx.pdf
TypeScript - An Introduction
Angular overview
Introduction to React JS for beginners | Namespace IT
TypeScript Introduction
Introduction to Django
Basics of Vue.js 2019
React workshop
Django Framework Overview forNon-Python Developers
Introduction to spring boot
Angular Data Binding
Angularjs PPT
Page Object Model and Implementation in Selenium
Typescript Fundamentals
React JS - A quick introduction tutorial
React hooks
Asp.net file types
Angular Dependency Injection
Ad

Viewers also liked (10)

PPTX
Django - Python MVC Framework
PPTX
Unchain Your Web Development With Django
PPTX
Introduction to django
PPTX
9월 웨비나 - AWS 클라우드 보안의 이해 (양승도 솔루션즈 아키텍트)
PDF
AWS Summit Seoul 2015 -CloudFront와 Route53 기반 콘텐츠 배포 전략 (GS네오텍-박정수)
PDF
DjangoGirls를 위한 Django on AWS - 윤석찬 (DjangoGirls Seoul 모임)
PDF
Python RESTful webservices with Python: Flask and Django solutions
PDF
Scalable Django Architecture
PPTX
Web backends development using Python
PDF
Create responsive websites with Django, REST and AngularJS
Django - Python MVC Framework
Unchain Your Web Development With Django
Introduction to django
9월 웨비나 - AWS 클라우드 보안의 이해 (양승도 솔루션즈 아키텍트)
AWS Summit Seoul 2015 -CloudFront와 Route53 기반 콘텐츠 배포 전략 (GS네오텍-박정수)
DjangoGirls를 위한 Django on AWS - 윤석찬 (DjangoGirls Seoul 모임)
Python RESTful webservices with Python: Flask and Django solutions
Scalable Django Architecture
Web backends development using Python
Create responsive websites with Django, REST and AngularJS
Ad

Similar to Django (20)

PPTX
Tutorial 1: Your First Science App - Araport Developer Workshop
PPTX
Django rest framework
PDF
Google app-engine-with-python
PDF
Django dev-env-my-way
PPTX
Django Architecture Introduction
PDF
GDG Addis - An Introduction to Django and App Engine
PDF
Django Overview
PPTX
Google App Engine for Python - Unit01: Basic
PPTX
Django framework
PDF
Rock Solid Deployment of Web Applications
PDF
Heroku pycon
ODP
eXo Platform SEA - Play Framework Introduction
KEY
Practical introduction to dev ops with chef
PDF
Priming Your Teams For Microservice Deployment to the Cloud
PPT
Build Automation of PHP Applications
KEY
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.
PDF
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
PPTX
Iac d.damyanov 4.pptx
KEY
Django deployment with PaaS
PPTX
Build Your First SharePoint Framework Webpart
Tutorial 1: Your First Science App - Araport Developer Workshop
Django rest framework
Google app-engine-with-python
Django dev-env-my-way
Django Architecture Introduction
GDG Addis - An Introduction to Django and App Engine
Django Overview
Google App Engine for Python - Unit01: Basic
Django framework
Rock Solid Deployment of Web Applications
Heroku pycon
eXo Platform SEA - Play Framework Introduction
Practical introduction to dev ops with chef
Priming Your Teams For Microservice Deployment to the Cloud
Build Automation of PHP Applications
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Iac d.damyanov 4.pptx
Django deployment with PaaS
Build Your First SharePoint Framework Webpart

Recently uploaded (20)

PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
ai tools demonstartion for schools and inter college
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Nekopoi APK 2025 free lastest update
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
medical staffing services at VALiNTRY
PPTX
Introduction to Artificial Intelligence
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms I-SECS-1021-03
ManageIQ - Sprint 268 Review - Slide Deck
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
ai tools demonstartion for schools and inter college
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Design an Analysis of Algorithms II-SECS-1021-03
Nekopoi APK 2025 free lastest update
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Operating system designcfffgfgggggggvggggggggg
How to Choose the Right IT Partner for Your Business in Malaysia
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Which alternative to Crystal Reports is best for small or large businesses.pdf
medical staffing services at VALiNTRY
Introduction to Artificial Intelligence
Online Work Permit System for Fast Permit Processing
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...

Django

  • 1. Django is a high-level Python Web framework that encourages rapid development, pragmatic design and follows DRY principles. By Abhijeet Shekhar Blog: http://ashekhar.wordpress.com
  • 2. Features • Legacy DB • Test Framework • Multi- DB • Geodjango • Aggregation • JSON Serializer • Stable API Promise • Fantastic Docs • Generic View • Template Inheritance • Template Filters • Humanize • Runs on Jython /Iron Python • Google App Engine
  • 5. Django is MTV/MVP framework -Model (app/models.py -Template ( app/templates/*.html) -View (app/view.py)
  • 6. Project Structure -project= the full website app=python library -Sample --__init__.py --settings.py --urls.py --wsgi.py -app-1 --_init_.py --admin.py --models.py --tests.py --urls.py --view.py -app-2 template/ manage.py env/ readme
  • 7. Environment setup and installation Standard installation: • Content will be stored in the default location of python Virtual installation: • All dependent library can be installed in the virtual environment. • one project will be one virtualenv. • Every project with different dependencies in terms of libraries and version. • Easier to deploy and forget dependency • Virtualenvwrapper is a convenient
  • 8. Steps to create a project • Create a project • Start an application • Create your database(Mysql, Post gre) • Configure DB settings in settings.py • Define your models • Add external modules • Add your template • Write your view • Create url mappping • Test application • Deploy application (linux apache , mod python
  • 9. Initialize Your Project $ django-admin.py startproject <project_name> $ cd <project_name> $ Python manage.py startapp my $ edit settings.py and set DB info $ python manage.py runserver Browse http://localhost:8000
  • 10. Settings: -multiple setting files: -per environment: dev, testing, staging , Production Per developer (local settings, use the host name ) -all setting file must inherit from , so you can do INSTALLED_APPS +=(‘debug_toolbar’) -version control all the setting !
  • 11. Fat models, thin viewer… -multiple setting files: -per environment: dev, testing, staging , production Per developer (local settings, use the host name ) -all setting file must inherit from , so you can do INSTALLED_APPS +=(‘debug_toolbar’) -version control all the setting !
  • 12. Debugging - ipython (./mange.py shell) - Ipdb - Import ipdb - Ipdb.set_trace() - django-debug-toolbar - very powerful - use it to optimze db performance, view by view
  • 13. Migration - South/migrate: - Intelligent schema & data migrations for Django - Can do backward migrations
  • 14. Deployment Web server - Niginx/Apache - wsgi - mod_python Static server - Nginx or any CDN