SlideShare a Scribd company logo
1 of 43
Django Web Framework 김형용, 이정민 Framework 2.1
Django ,[object Object],[object Object],[object Object],[object Object]
History ,[object Object],[object Object],[object Object],[object Object],[object Object]
“ Django”  어떻게 읽어요 ? ,[object Object],[object Object],[object Object],[object Object],[object Object]
Installation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Install Python ,[object Object],[object Object],[object Object],[object Object],[object Object]
Install SQLite3, pysqlite 2 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Install Django (0.95) ,[object Object],[object Object],[object Object],[object Object]
Tutorial
Project (site) :  framework21 Database Application : admin Application : admin Application : admin /admin/ Application :  blog /blog/ Application :  phonebook /phonebook/
startproject ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RoR Django
startapp ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],RoR
Create Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Activating model(Application) ,[object Object],[object Object]
Play with Model API ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
admin interface. ,[object Object],[object Object],[object Object],[object Object],[object Object]
URL design ,[object Object],[object Object],[object Object],[object Object]
View ,[object Object],[object Object],[object Object]
Stub view ,[object Object],[object Object],[object Object],[object Object],[object Object]
Template ,[object Object]
Template ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
URL Resolver
URL Resolver blog/urls.py urlpatterns = patterns(‘blog.views', … (r'^blog/$',  ‘post_list'), (r'^blog/new/$',  ‘post_new'), (r'^blog/(?P<post_id>+)/$', ‘post_detail'), …
URL Resolver blog/urls.py urlpatterns = patterns(' blog.views ', … (r'^blog/$',  ‘post_list'), (r'^blog/new/$',  ‘post_new'), (r'^blog/(?P<post_id>+)/$' , ‘post_detail'), …
URL Resolver blog/urls.py urlpatterns = patterns( ' blog.views ' , … (r'^blog/$',  ‘post_list'), (r'^blog/new/$',  ‘post_new'), (r'^blog/(?P<post_id>+)/$',  ‘post_detail'), … blog.views.post_detail view
URL Resolver blog/urls.py urlpatterns = patterns( ' blog.views ', … (r'^blog/$',  ‘post_list'), (r'^blog/new/$',  ‘post_new'), (r'^blog/ (?P<post_id>+) /$',  ‘post_detail'), … blog.views.post_detail(post_id=‘2’) view
URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) … blog.views.post_detail(post_id=‘2’)
URL Resolver view blog/views.py def post_detail(request, post_id): post =  Post.objects.get(pk=post_id) … model
URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) … Django template blog/templates/blog_detail.html
URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) … Django template blog/templates/blog_detail.html
URL Resolver view blog/templates/blog_detail.html <h1> {{  post .title }} </h1> <p> {{ post.content|restructuredText }} </p> Comments: <ul> {% for comment in post.comments %} <li> {{ comment.who }}: {{ comment.content }} </li> {% endfor %} </ul> Django template Context({‘post’: post})
URL Resolver view blog/templates/blog_detail.html <h1> {{ post.title }} </h1> <p> {{ post.content|restructuredText }} </p> Comments: <ul> {% for comment in post.comments %} <li> {{ comment.who }}: {{ comment.content }} </li> {% endfor %} </ul> Django template <h1>  여자친구 구함  </h1> <p> 20 세 이상 신체건강한 대한민국… </p> Comments: <ul> <li>  이정민 :  좋은 결과 있길바랍니다 . </li> </ul>
URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) return HttpResponse(html)
URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) return HttpResponse(html) OR
URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) return HttpResponse(html) def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) return render_to_response(‘blog_detail.html’, {‘post’: post}) OR
 
URL Resolver view Django template model
Where is MIDDLEWARE? URL Resolver view Django template model mid.process_request(request) mid.process_view(request, view_func, view_args, view_kwargs) mid.process_response(request, response)
Server arrangement ,[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusion ,[object Object],[object Object],[object Object],[object Object],[object Object]
이런저런 이야기 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Getting Involved ,[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Web application development with Django framework
Web application development with Django frameworkWeb application development with Django framework
Web application development with Django frameworkflapiello
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 
Building a Dynamic Website Using Django
Building a Dynamic Website Using DjangoBuilding a Dynamic Website Using Django
Building a Dynamic Website Using DjangoNathan Eror
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talkdtdannen
 
Django REST Framework
Django REST FrameworkDjango REST Framework
Django REST FrameworkLoad Impact
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersChristine Cheung
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoJames Casey
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwalratneshsinghparihar
 
High Performance Django
High Performance DjangoHigh Performance Django
High Performance DjangoDjangoCon2008
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Jacob Kaplan-Moss
 
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
 
Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application StructureSEONGTAEK OH
 
API Design & Security in django
API Design & Security in djangoAPI Design & Security in django
API Design & Security in djangoTareque Hossain
 
Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With BloggingTakatsugu Shigeta
 

What's hot (20)

Django by rj
Django by rjDjango by rj
Django by rj
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Writing Pluggable Software
Writing Pluggable SoftwareWriting Pluggable Software
Writing Pluggable Software
 
Rest api with Python
Rest api with PythonRest api with Python
Rest api with Python
 
Web application development with Django framework
Web application development with Django frameworkWeb application development with Django framework
Web application development with Django framework
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 
Building a Dynamic Website Using Django
Building a Dynamic Website Using DjangoBuilding a Dynamic Website Using Django
Building a Dynamic Website Using Django
 
Django tech-talk
Django tech-talkDjango tech-talk
Django tech-talk
 
Django REST Framework
Django REST FrameworkDjango REST Framework
Django REST Framework
 
Best Practices for Front-End Django Developers
Best Practices for Front-End Django DevelopersBest Practices for Front-End Django Developers
Best Practices for Front-End Django Developers
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwal
 
High Performance Django
High Performance DjangoHigh Performance Django
High Performance Django
 
Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)Introduction To Django (Strange Loop 2011)
Introduction To Django (Strange Loop 2011)
 
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
 
Django Framework and Application Structure
Django Framework and Application StructureDjango Framework and Application Structure
Django Framework and Application Structure
 
API Design & Security in django
API Design & Security in djangoAPI Design & Security in django
API Design & Security in django
 
Ant
Ant Ant
Ant
 
Evolution of API With Blogging
Evolution of API With BloggingEvolution of API With Blogging
Evolution of API With Blogging
 
Free django
Free djangoFree django
Free django
 

Viewers also liked

Viewers also liked (8)

mic06-jay-prezentacija
mic06-jay-prezentacijamic06-jay-prezentacija
mic06-jay-prezentacija
 
02-11-05
02-11-0502-11-05
02-11-05
 
Harvard
HarvardHarvard
Harvard
 
konane-talk
konane-talkkonane-talk
konane-talk
 
finance
financefinance
finance
 
socialnetworking
socialnetworkingsocialnetworking
socialnetworking
 
ONA_Dornisch_GAO
ONA_Dornisch_GAOONA_Dornisch_GAO
ONA_Dornisch_GAO
 
bio-intro
bio-introbio-intro
bio-intro
 

Similar to Django

Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosIgor Sobreira
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkDirk Haun
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?brynary
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2fishwarter
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsDylan Jay
 
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rob
 
Django O/R Mapper
Django O/R MapperDjango O/R Mapper
Django O/R MapperIan Lewis
 
Meetup django common_problems(1)
Meetup django common_problems(1)Meetup django common_problems(1)
Meetup django common_problems(1)Eric Satterwhite
 
Gae Meets Django
Gae Meets DjangoGae Meets Django
Gae Meets Djangofool2nd
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Anatoly Sharifulin
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with PerlDave Cross
 
PyCon APAC - Django Test Driven Development
PyCon APAC - Django Test Driven DevelopmentPyCon APAC - Django Test Driven Development
PyCon APAC - Django Test Driven DevelopmentTudor Munteanu
 
Testing persistence in PHP with DbUnit
Testing persistence in PHP with DbUnitTesting persistence in PHP with DbUnit
Testing persistence in PHP with DbUnitPeter Wilcsinszky
 

Similar to Django (20)

Django
DjangoDjango
Django
 
Django - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazosDjango - Framework web para perfeccionistas com prazos
Django - Framework web para perfeccionistas com prazos
 
Django
DjangoDjango
Django
 
Using Geeklog as a Web Application Framework
Using Geeklog as a Web Application FrameworkUsing Geeklog as a Web Application Framework
Using Geeklog as a Web Application Framework
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
The Django Web Application Framework 2
The Django Web Application Framework 2The Django Web Application Framework 2
The Django Web Application Framework 2
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008
 
Django O/R Mapper
Django O/R MapperDjango O/R Mapper
Django O/R Mapper
 
Meetup django common_problems(1)
Meetup django common_problems(1)Meetup django common_problems(1)
Meetup django common_problems(1)
 
Gae Meets Django
Gae Meets DjangoGae Meets Django
Gae Meets Django
 
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
 
Modern Web Development with Perl
Modern Web Development with PerlModern Web Development with Perl
Modern Web Development with Perl
 
Django Vs Rails
Django Vs RailsDjango Vs Rails
Django Vs Rails
 
PyCon APAC - Django Test Driven Development
PyCon APAC - Django Test Driven DevelopmentPyCon APAC - Django Test Driven Development
PyCon APAC - Django Test Driven Development
 
Testing persistence in PHP with DbUnit
Testing persistence in PHP with DbUnitTesting persistence in PHP with DbUnit
Testing persistence in PHP with DbUnit
 

More from webuploader

Michael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_NetworkingMichael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_Networkingwebuploader
 
cyberSecurity_Milliron
cyberSecurity_MillironcyberSecurity_Milliron
cyberSecurity_Millironwebuploader
 
LiveseyMotleyPresentation
LiveseyMotleyPresentationLiveseyMotleyPresentation
LiveseyMotleyPresentationwebuploader
 
FairShare_Morningstar_022607
FairShare_Morningstar_022607FairShare_Morningstar_022607
FairShare_Morningstar_022607webuploader
 
3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling3_System_Requirements_and_Scaling
3_System_Requirements_and_Scalingwebuploader
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailabilitywebuploader
 
scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practiceswebuploader
 
7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summitwebuploader
 
FreeBSD - LinuxExpo
FreeBSD - LinuxExpoFreeBSD - LinuxExpo
FreeBSD - LinuxExpowebuploader
 

More from webuploader (20)

Michael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_NetworkingMichael_Hulme_Banff_Social_Networking
Michael_Hulme_Banff_Social_Networking
 
socialpref
socialprefsocialpref
socialpref
 
cyberSecurity_Milliron
cyberSecurity_MillironcyberSecurity_Milliron
cyberSecurity_Milliron
 
PJO-3B
PJO-3BPJO-3B
PJO-3B
 
LiveseyMotleyPresentation
LiveseyMotleyPresentationLiveseyMotleyPresentation
LiveseyMotleyPresentation
 
FairShare_Morningstar_022607
FairShare_Morningstar_022607FairShare_Morningstar_022607
FairShare_Morningstar_022607
 
saito_porcupine
saito_porcupinesaito_porcupine
saito_porcupine
 
3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling3_System_Requirements_and_Scaling
3_System_Requirements_and_Scaling
 
ScalabilityAvailability
ScalabilityAvailabilityScalabilityAvailability
ScalabilityAvailability
 
scale_perf_best_practices
scale_perf_best_practicesscale_perf_best_practices
scale_perf_best_practices
 
7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit7496_Hall 070204 Research Faculty Summit
7496_Hall 070204 Research Faculty Summit
 
Chapter5
Chapter5Chapter5
Chapter5
 
Mak3
Mak3Mak3
Mak3
 
visagie_freebsd
visagie_freebsdvisagie_freebsd
visagie_freebsd
 
freebsd-watitis
freebsd-watitisfreebsd-watitis
freebsd-watitis
 
BPotter-L1-05
BPotter-L1-05BPotter-L1-05
BPotter-L1-05
 
FreeBSD - LinuxExpo
FreeBSD - LinuxExpoFreeBSD - LinuxExpo
FreeBSD - LinuxExpo
 
CLI313
CLI313CLI313
CLI313
 
CFInterop
CFInteropCFInterop
CFInterop
 
WCE031_WH06
WCE031_WH06WCE031_WH06
WCE031_WH06
 

Recently uploaded

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Recently uploaded (20)

Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Django

  • 1. Django Web Framework 김형용, 이정민 Framework 2.1
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10. Project (site) : framework21 Database Application : admin Application : admin Application : admin /admin/ Application : blog /blog/ Application : phonebook /phonebook/
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.  
  • 24. URL Resolver blog/urls.py urlpatterns = patterns(‘blog.views', … (r'^blog/$', ‘post_list'), (r'^blog/new/$', ‘post_new'), (r'^blog/(?P<post_id>+)/$', ‘post_detail'), …
  • 25. URL Resolver blog/urls.py urlpatterns = patterns(' blog.views ', … (r'^blog/$', ‘post_list'), (r'^blog/new/$', ‘post_new'), (r'^blog/(?P<post_id>+)/$' , ‘post_detail'), …
  • 26. URL Resolver blog/urls.py urlpatterns = patterns( ' blog.views ' , … (r'^blog/$', ‘post_list'), (r'^blog/new/$', ‘post_new'), (r'^blog/(?P<post_id>+)/$', ‘post_detail'), … blog.views.post_detail view
  • 27. URL Resolver blog/urls.py urlpatterns = patterns( ' blog.views ', … (r'^blog/$', ‘post_list'), (r'^blog/new/$', ‘post_new'), (r'^blog/ (?P<post_id>+) /$', ‘post_detail'), … blog.views.post_detail(post_id=‘2’) view
  • 28. URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) … blog.views.post_detail(post_id=‘2’)
  • 29. URL Resolver view blog/views.py def post_detail(request, post_id): post = Post.objects.get(pk=post_id) … model
  • 30. URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) … Django template blog/templates/blog_detail.html
  • 31. URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) … Django template blog/templates/blog_detail.html
  • 32. URL Resolver view blog/templates/blog_detail.html <h1> {{ post .title }} </h1> <p> {{ post.content|restructuredText }} </p> Comments: <ul> {% for comment in post.comments %} <li> {{ comment.who }}: {{ comment.content }} </li> {% endfor %} </ul> Django template Context({‘post’: post})
  • 33. URL Resolver view blog/templates/blog_detail.html <h1> {{ post.title }} </h1> <p> {{ post.content|restructuredText }} </p> Comments: <ul> {% for comment in post.comments %} <li> {{ comment.who }}: {{ comment.content }} </li> {% endfor %} </ul> Django template <h1> 여자친구 구함 </h1> <p> 20 세 이상 신체건강한 대한민국… </p> Comments: <ul> <li> 이정민 : 좋은 결과 있길바랍니다 . </li> </ul>
  • 34. URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) return HttpResponse(html)
  • 35. URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) return HttpResponse(html) OR
  • 36. URL Resolver view blog/views.py def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) t = loader.get_template(‘blog_detail.html’) c = Context({‘post’: post}) html = t.render(c) return HttpResponse(html) def post_detail(request, post_id): post = Blog.objects.get(pk=post_id) return render_to_response(‘blog_detail.html’, {‘post’: post}) OR
  • 37.  
  • 38. URL Resolver view Django template model
  • 39. Where is MIDDLEWARE? URL Resolver view Django template model mid.process_request(request) mid.process_view(request, view_func, view_args, view_kwargs) mid.process_response(request, response)
  • 40.
  • 41.
  • 42.
  • 43.