SlideShare une entreprise Scribd logo
1  sur  15
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 

Contenu connexe

Tendances

Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythoneShikshak
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial之宇 趙
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction DjangoWade Austin
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to djangoIlian Iliev
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and SessionsNisa Soomro
 
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Edureka!
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Zhe Li
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and DjangoMichael Pirnat
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flaskJim Yeh
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object ModelWebStackAcademy
 
Full stack development
Full stack developmentFull stack development
Full stack developmentArnav Gupta
 

Tendances (20)

Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
 
Django
DjangoDjango
Django
 
Introduction Django
Introduction DjangoIntroduction Django
Introduction Django
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Flask for cs students
Flask for cs studentsFlask for cs students
Flask for cs students
 
Python/Django Training
Python/Django TrainingPython/Django Training
Python/Django Training
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...Introduction to Django REST Framework, an easy way to build REST framework in...
Introduction to Django REST Framework, an easy way to build REST framework in...
 
Web Development with Python and Django
Web Development with Python and DjangoWeb Development with Python and Django
Web Development with Python and Django
 
Web develop in flask
Web develop in flaskWeb develop in flask
Web develop in flask
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
PHP
PHPPHP
PHP
 
Json
JsonJson
Json
 
Full stack development
Full stack developmentFull stack development
Full stack development
 
Django Seminar
Django SeminarDjango Seminar
Django Seminar
 

En vedette

Unchain Your Web Development With Django
Unchain Your Web Development With DjangoUnchain Your Web Development With Django
Unchain Your Web Development With DjangoJoey Wilhelm
 
9월 웨비나 - AWS 클라우드 보안의 이해 (양승도 솔루션즈 아키텍트)
9월 웨비나 - AWS 클라우드 보안의 이해 (양승도 솔루션즈 아키텍트)9월 웨비나 - AWS 클라우드 보안의 이해 (양승도 솔루션즈 아키텍트)
9월 웨비나 - AWS 클라우드 보안의 이해 (양승도 솔루션즈 아키텍트)Amazon Web Services Korea
 
AWS Summit Seoul 2015 -CloudFront와 Route53 기반 콘텐츠 배포 전략 (GS네오텍-박정수)
AWS Summit Seoul 2015 -CloudFront와 Route53 기반 콘텐츠 배포 전략 (GS네오텍-박정수)AWS Summit Seoul 2015 -CloudFront와 Route53 기반 콘텐츠 배포 전략 (GS네오텍-박정수)
AWS Summit Seoul 2015 -CloudFront와 Route53 기반 콘텐츠 배포 전략 (GS네오텍-박정수)Amazon Web Services Korea
 
DjangoGirls를 위한 Django on AWS - 윤석찬 (DjangoGirls Seoul 모임)
DjangoGirls를 위한 Django on AWS - 윤석찬 (DjangoGirls Seoul 모임)DjangoGirls를 위한 Django on AWS - 윤석찬 (DjangoGirls Seoul 모임)
DjangoGirls를 위한 Django on AWS - 윤석찬 (DjangoGirls Seoul 모임)Amazon Web Services Korea
 
Python RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsPython RESTful webservices with Python: Flask and Django solutions
Python RESTful webservices with Python: Flask and Django solutionsSolution4Future
 
Scalable Django Architecture
Scalable Django ArchitectureScalable Django Architecture
Scalable Django ArchitectureRami Sayar
 
Web backends development using Python
Web backends development using PythonWeb backends development using Python
Web backends development using PythonAyun Park
 
Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSHannes Hapke
 

En vedette (9)

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

Similaire à Django

Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopVivek Krishnakumar
 
Django rest framework
Django rest frameworkDjango rest framework
Django rest frameworkBlank Chen
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-pythonDeepak Garg
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineYared Ayalew
 
Django Overview
Django OverviewDjango Overview
Django OverviewBrian Tol
 
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicWei-Tsung Su
 
Django framework
Django framework Django framework
Django framework TIB Academy
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chefLeanDog
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudMatt Callanan
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP ApplicationsPavan Kumar N
 
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.PyCon AU 2010 - Getting Started With Apache/mod_wsgi.
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.Graham Dumpleton
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaSAppsembler
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartEric Overfield
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmAnton Shapin
 

Similaire à Django (20)

Tutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer WorkshopTutorial 1: Your First Science App - Araport Developer Workshop
Tutorial 1: Your First Science App - Araport Developer Workshop
 
Django rest framework
Django rest frameworkDjango rest framework
Django rest framework
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-python
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
GDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App EngineGDG Addis - An Introduction to Django and App Engine
GDG Addis - An Introduction to Django and App Engine
 
Django Overview
Django OverviewDjango Overview
Django Overview
 
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: Basic
 
Django framework
Django framework Django framework
Django framework
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Heroku pycon
Heroku pyconHeroku pycon
Heroku pycon
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Build Automation of PHP Applications
Build Automation of PHP ApplicationsBuild Automation of PHP Applications
Build Automation of PHP Applications
 
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.PyCon AU 2010 - Getting Started With Apache/mod_wsgi.
PyCon AU 2010 - Getting Started With Apache/mod_wsgi.
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Iac d.damyanov 4.pptx
Iac d.damyanov 4.pptxIac d.damyanov 4.pptx
Iac d.damyanov 4.pptx
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaS
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvm
 

Dernier

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 

Dernier (20)

How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 

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