SlideShare a Scribd company logo
DJANGO 
-Harmeet
What is Django? 
Django is a python-based web 
framework.
What is a framework? 
A web application framework (WAF) is a 
software framework that is designed to support 
the development of dynamic websites, web 
applications, web services and web resources.
The MTV Design 
 M-Models 
 T-Templates 
 V-View
Creating a Project 
Move to the directory where you want to create the project 
Type the following command in terminal 
C:/Python27/Scripts/django-admin.py startproject myprojectname 
Mysite/ 
manage.py 
mysite/ 
__init__.py 
settings.py 
urls.py 
wsgi.py
Settings.py 
 Databases 
DATABASES = { 
'default': { 
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 
'sqlite3' or 'oracle'. 
'NAME': '', # Or path to database file if using sqlite3. 
'USER': '', # Not used with sqlite3. 
'PASSWORD': '', # Not used with sqlite3. 
'HOST': '', # Set to empty string for localhost. Not used with 
sqlite3. 
'PORT': '', # Set to empty string for default. Not used with 
sqlite3. 
} 
}
Settings.py (contd…) 
 Debug- is a boolean field and used to 
decide if your project is running on debug 
mode or not.
Creating an App 
 Move inside your project directory 
 Type the following in your terminal 
python manage.py startapp appname 
Your directory listing will look like 
books/ 
__init__.py 
admin.py 
models.py 
tests.py 
views.py
View 
 It is a python function that takes a request 
parameter as its first argument. 
 It always returns a response. 
from django.http import HttpResponse 
def hello(request): 
#Your code goes here 
return HttpResponse("Hello world")
URL(s) 
 It is used to link up your view to a URL(s) typed in the 
address bar. 
 It is a mapping between URL(s) and view functions that 
should be called for those URL(s) 
from django.conf.urls.defaults import patterns, include, url 
from mysite.views import hello 
urlpatterns = patterns('', 
url(r'^hello/$', hello), 
)
Refrences 
 https://www.djangoproject.com/ 
 https://www.djangobook.com 
 http://www.tangowithdjango.com/
Django: 
The Web framework for 
perfectionists with deadlines 
Thank you!

More Related Content

What's hot

4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slidesMasterCode.vn
 
Introduction to testing in Rails
Introduction to testing in RailsIntroduction to testing in Rails
Introduction to testing in Rails
benlcollins
 
Function calling in js
Function calling in jsFunction calling in js
ZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async Primer
Adam Englander
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
Bala Kumar
 
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir NazimDjango Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Mir Nazim
 
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing KateWriting plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
Abhishek Patil
 
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job QueueTask Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Sam Hennessy
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Steven Pignataro
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Django
jeff_croft
 
Overwriting code in Drupal
Overwriting code in DrupalOverwriting code in Drupal
Overwriting code in Drupal
Amazee Labs
 
jQuery Plugin
jQuery PluginjQuery Plugin
jQuery Plugin
rbiggs
 
5. CodeIgniter copy1
5. CodeIgniter copy15. CodeIgniter copy1
5. CodeIgniter copy1
Razvan Raducanu, PhD
 
Debugging
DebuggingDebugging
Debugging
Max Friel
 
Kyiv.py #17 Flask talk
Kyiv.py #17 Flask talkKyiv.py #17 Flask talk
Kyiv.py #17 Flask talk
Alexey Popravka
 

What's hot (15)

4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides4 introduction-php-mvc-cakephp-m4-controllers-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides
 
Introduction to testing in Rails
Introduction to testing in RailsIntroduction to testing in Rails
Introduction to testing in Rails
 
Function calling in js
Function calling in jsFunction calling in js
Function calling in js
 
ZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async PrimerZendCon 2017 - Build a Bot Workshop - Async Primer
ZendCon 2017 - Build a Bot Workshop - Async Primer
 
Django - Python MVC Framework
Django - Python MVC FrameworkDjango - Python MVC Framework
Django - Python MVC Framework
 
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir NazimDjango Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
Django Introduction Osscamp Delhi September 08 09 2007 Mir Nazim
 
Writing plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing KateWriting plugins for Kate and enhancing Kate
Writing plugins for Kate and enhancing Kate
 
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job QueueTask Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
 
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven PignataroJoomla! Day Chicago 2011 Presentation - Steven Pignataro
Joomla! Day Chicago 2011 Presentation - Steven Pignataro
 
Getting Started With Django
Getting Started With DjangoGetting Started With Django
Getting Started With Django
 
Overwriting code in Drupal
Overwriting code in DrupalOverwriting code in Drupal
Overwriting code in Drupal
 
jQuery Plugin
jQuery PluginjQuery Plugin
jQuery Plugin
 
5. CodeIgniter copy1
5. CodeIgniter copy15. CodeIgniter copy1
5. CodeIgniter copy1
 
Debugging
DebuggingDebugging
Debugging
 
Kyiv.py #17 Flask talk
Kyiv.py #17 Flask talkKyiv.py #17 Flask talk
Kyiv.py #17 Flask talk
 

Viewers also liked

Голосование (Перевозка)
Голосование (Перевозка)Голосование (Перевозка)
Голосование (Перевозка)
CrowdOPENGOV
 
Технология бродильных производств и виноделия
Технология бродильных производств и виноделияТехнология бродильных производств и виноделия
Технология бродильных производств и виноделия
Keisibaster
 
Tarea 4corregida
Tarea 4corregidaTarea 4corregida
Tarea 4corregida
Nieves88
 
"СЛОЖНОСТИ"
"СЛОЖНОСТИ""СЛОЖНОСТИ"
"СЛОЖНОСТИ"
CrowdOPENGOV
 
Резутьтаты голосования
Резутьтаты голосованияРезутьтаты голосования
Резутьтаты голосования
CrowdOPENGOV
 
Palestrante Maria Flávia
Palestrante Maria FláviaPalestrante Maria Flávia
Palestrante Maria Flávia
DMT Palestras
 
Голосование (Инфраструктура)
Голосование (Инфраструктура)Голосование (Инфраструктура)
Голосование (Инфраструктура)
CrowdOPENGOV
 
2016 Home Care 100 - Current Attendee List
2016 Home Care 100 - Current Attendee List2016 Home Care 100 - Current Attendee List
2016 Home Care 100 - Current Attendee List
Michael A. Morrissey
 
10 Most Expensive Yachts in the World
10 Most Expensive Yachts in the World10 Most Expensive Yachts in the World
10 Most Expensive Yachts in the World
Ropes Direct
 
Голосование (Вожатый)
Голосование (Вожатый)Голосование (Вожатый)
Голосование (Вожатый)
CrowdOPENGOV
 
Best buy
Best buy Best buy
Best buy
James Liao
 
Knowledge management kpi
Knowledge management kpiKnowledge management kpi
Knowledge management kpidaviterrawhite
 
Tarea 5.
Tarea 5.Tarea 5.
Tarea 5.
Nieves88
 
Aplikasi software
Aplikasi softwareAplikasi software
Aplikasi software
Ferdinan Julianto
 
Professional etiquette short version
Professional etiquette short versionProfessional etiquette short version
Professional etiquette short version
San Antonio de Padua - Center for Alternative Mathematics
 

Viewers also liked (20)

Cardiovascular system
Cardiovascular systemCardiovascular system
Cardiovascular system
 
Голосование (Перевозка)
Голосование (Перевозка)Голосование (Перевозка)
Голосование (Перевозка)
 
CNaPPES 2016 - Comunicação e-IPP
CNaPPES 2016 - Comunicação e-IPPCNaPPES 2016 - Comunicação e-IPP
CNaPPES 2016 - Comunicação e-IPP
 
Технология бродильных производств и виноделия
Технология бродильных производств и виноделияТехнология бродильных производств и виноделия
Технология бродильных производств и виноделия
 
Tarea 4corregida
Tarea 4corregidaTarea 4corregida
Tarea 4corregida
 
"СЛОЖНОСТИ"
"СЛОЖНОСТИ""СЛОЖНОСТИ"
"СЛОЖНОСТИ"
 
Резутьтаты голосования
Резутьтаты голосованияРезутьтаты голосования
Резутьтаты голосования
 
Palestrante Maria Flávia
Palestrante Maria FláviaPalestrante Maria Flávia
Palestrante Maria Flávia
 
Tap
TapTap
Tap
 
Голосование (Инфраструктура)
Голосование (Инфраструктура)Голосование (Инфраструктура)
Голосование (Инфраструктура)
 
2016 Home Care 100 - Current Attendee List
2016 Home Care 100 - Current Attendee List2016 Home Care 100 - Current Attendee List
2016 Home Care 100 - Current Attendee List
 
10 Most Expensive Yachts in the World
10 Most Expensive Yachts in the World10 Most Expensive Yachts in the World
10 Most Expensive Yachts in the World
 
Голосование (Вожатый)
Голосование (Вожатый)Голосование (Вожатый)
Голосование (Вожатый)
 
Animal tissues epithelial & connective
Animal tissues epithelial & connectiveAnimal tissues epithelial & connective
Animal tissues epithelial & connective
 
Best buy
Best buy Best buy
Best buy
 
Knowledge management kpi
Knowledge management kpiKnowledge management kpi
Knowledge management kpi
 
Tarea 5.
Tarea 5.Tarea 5.
Tarea 5.
 
Rama
RamaRama
Rama
 
Aplikasi software
Aplikasi softwareAplikasi software
Aplikasi software
 
Professional etiquette short version
Professional etiquette short versionProfessional etiquette short version
Professional etiquette short version
 

Similar to Django

بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
railsbootcamp
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for Beginners
Jason Davies
 
Mini Curso de Django
Mini Curso de DjangoMini Curso de Django
Mini Curso de Django
Felipe Queiroz
 
DJango
DJangoDJango
DJango
Sunil OS
 
React django
React djangoReact django
React django
Heber Silva
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
Haiqi Chen
 
Django framework
Django framework Django framework
Django framework
TIB Academy
 
Django web framework
Django web frameworkDjango web framework
Django web framework
Abdenour Bouateli
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
David Gibbons
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics Presentation
Shrinath Shenoy
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
Joaquim Rocha
 
Treinamento django
Treinamento djangoTreinamento django
Treinamento django
Afonso França de Oliveira
 
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_introduction20141030
django_introduction20141030django_introduction20141030
django_introduction20141030Kevin Wu
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django FrameworkRicardo Soares
 
Build and deploy Python Django project
Build and deploy Python Django projectBuild and deploy Python Django project
Build and deploy Python Django project
Xiaoqi Zhao
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)
Nishant Soni
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
Lakshman Prasad
 

Similar to Django (20)

Django by rj
Django by rjDjango by rj
Django by rj
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
 
Django for Beginners
Django for BeginnersDjango for Beginners
Django for Beginners
 
Mini Curso de Django
Mini Curso de DjangoMini Curso de Django
Mini Curso de Django
 
DJango
DJangoDJango
DJango
 
React django
React djangoReact django
React django
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Django framework
Django framework Django framework
Django framework
 
Django - basics
Django - basicsDjango - basics
Django - basics
 
Django web framework
Django web frameworkDjango web framework
Django web framework
 
How to Webpack your Django!
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics Presentation
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Treinamento django
Treinamento djangoTreinamento django
Treinamento django
 
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_introduction20141030
django_introduction20141030django_introduction20141030
django_introduction20141030
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django Framework
 
Build and deploy Python Django project
Build and deploy Python Django projectBuild and deploy Python Django project
Build and deploy Python Django project
 
Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)Rapid web application development using django - Part (1)
Rapid web application development using django - Part (1)
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 

Recently uploaded

The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
VivekSinghShekhawat2
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 

Recently uploaded (20)

The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptxInternet-Security-Safeguarding-Your-Digital-World (1).pptx
Internet-Security-Safeguarding-Your-Digital-World (1).pptx
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 

Django

  • 2. What is Django? Django is a python-based web framework.
  • 3. What is a framework? A web application framework (WAF) is a software framework that is designed to support the development of dynamic websites, web applications, web services and web resources.
  • 4. The MTV Design  M-Models  T-Templates  V-View
  • 5. Creating a Project Move to the directory where you want to create the project Type the following command in terminal C:/Python27/Scripts/django-admin.py startproject myprojectname Mysite/ manage.py mysite/ __init__.py settings.py urls.py wsgi.py
  • 6. Settings.py  Databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } }
  • 7. Settings.py (contd…)  Debug- is a boolean field and used to decide if your project is running on debug mode or not.
  • 8. Creating an App  Move inside your project directory  Type the following in your terminal python manage.py startapp appname Your directory listing will look like books/ __init__.py admin.py models.py tests.py views.py
  • 9. View  It is a python function that takes a request parameter as its first argument.  It always returns a response. from django.http import HttpResponse def hello(request): #Your code goes here return HttpResponse("Hello world")
  • 10. URL(s)  It is used to link up your view to a URL(s) typed in the address bar.  It is a mapping between URL(s) and view functions that should be called for those URL(s) from django.conf.urls.defaults import patterns, include, url from mysite.views import hello urlpatterns = patterns('', url(r'^hello/$', hello), )
  • 11. Refrences  https://www.djangoproject.com/  https://www.djangobook.com  http://www.tangowithdjango.com/
  • 12. Django: The Web framework for perfectionists with deadlines Thank you!