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

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Recently uploaded (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

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.