SlideShare a Scribd company logo
1 of 23
Jen Zajac  @jenofdoom [email_address] Django for n00bs
Introduction
What is a framework? Photo credit: http://www.flickr.com/photos/ikhlasulamal/2331176652/
Frameworks vs CMS's ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some backstory Photo credit: http://www.flickr.com/photos/scottummy/4971054099/
Other frameworks ,[object Object],[object Object],[object Object],[object Object],http://en.wikipedia.org/wiki/Comparison_of_Web_application_frameworks
So why would I pick Django? Photo credit: http://www.sxc.hu/photo/495550 (apologies for aspect ratio)
Pros (and some Cons) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MVC: Models, Views, Controllers Photo credit: http://www.flickr.com/photos/helloturkeytoe/5781708201
Django's MVC model ,[object Object],[object Object]
Setting up a project Photo credit: http://www.flickr.com/photos/thedailyenglishshow/6013713229/ Disclaimer! The following slides were not in my talk: I did a bit of a live demo instead. So these aren’t 100% complete, just a flavour of my talk.
It worked! So, I’m not going to cover installing Django… it’s really easy to get a local set-up, just follow the installation docs on the Django site. When you’ve done that you should end up with this, once you run the test server:
Enabling the admin ,[object Object]
So, probably we want to create a model now… ,[object Object]
We can use our admin interface to add data
OK, so we have a model… how users see it? ,[object Object],^ This is a regular expression. It’s a simple one! It just catches a number ( for Digit) and makes it into a name variable which will pass to our view, movie_detail
So what does the view look like? ,[object Object],So, does it work? Yes!
We probably want to display some better info… ,[object Object],(actually, for simple views like these we can actually just wire this call into the urlconf – but with a dedicated view like this we could add in extra processing)
Outputting to a template ,[object Object],<- we can stack specific page templates onto a general template <- we can access the stored different parts of the model within the template
And it should then display
Other Nice Things ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
In Conclusion Photo credit: http://www.flickr.com/photos/wonderferret/306390009/
Resources ,[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)
Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)
Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)Adam Dunford
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end appsZohar Arad
 
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08Tim Stephenson
 
WordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieWordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieBrecht Ryckaert
 
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de SitesCaelum
 
Joomla 10-jaar-vooruitgang-jdnl15
Joomla 10-jaar-vooruitgang-jdnl15Joomla 10-jaar-vooruitgang-jdnl15
Joomla 10-jaar-vooruitgang-jdnl15Peter Martin
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumAdam Christian
 
Make JavaScript Faster
Make JavaScript FasterMake JavaScript Faster
Make JavaScript FasterSteve Souders
 
Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2Sebastiano Armeli
 
How to speed up your website?
How to speed up your website?How to speed up your website?
How to speed up your website?Cakra Danu Sedayu
 
Creating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPressCreating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPresscodebangla
 
Themes that perform short: WordCamp Antwerp 2016
Themes that perform short: WordCamp Antwerp 2016Themes that perform short: WordCamp Antwerp 2016
Themes that perform short: WordCamp Antwerp 2016Octavio Andrés Cifuentes
 
Vue.js Getting Started
Vue.js Getting StartedVue.js Getting Started
Vue.js Getting StartedMurat Doğan
 
Performance.now() fast but not furious
Performance.now()   fast but not furiousPerformance.now()   fast but not furious
Performance.now() fast but not furiousAnna Migas
 
What’s New in ASP.NET 4
What’s New in ASP.NET 4What’s New in ASP.NET 4
What’s New in ASP.NET 4Todd Anglin
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End PerformanceChris Love
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance SnippetsSteve Souders
 
Lighthouse custom audits - London Web Performance 2019
Lighthouse custom audits -  London Web Performance 2019Lighthouse custom audits -  London Web Performance 2019
Lighthouse custom audits - London Web Performance 2019Aymen Loukil
 

What's hot (20)

Keep the Web Fast
Keep the Web FastKeep the Web Fast
Keep the Web Fast
 
Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)
Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)
Does This Theme Make My Website Look Fat? (Wordcamp SLC 2013)
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end apps
 
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
WordPress as a Platform - talk to Bristol Open Source Meetup, 2014-12-08
 
WordPress Performantie Optimalisatie
WordPress Performantie OptimalisatieWordPress Performantie Optimalisatie
WordPress Performantie Optimalisatie
 
Front-End Tooling
Front-End ToolingFront-End Tooling
Front-End Tooling
 
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
[QCon 2011] Por uma web mais rápida: técnicas de otimização de Sites
 
Joomla 10-jaar-vooruitgang-jdnl15
Joomla 10-jaar-vooruitgang-jdnl15Joomla 10-jaar-vooruitgang-jdnl15
Joomla 10-jaar-vooruitgang-jdnl15
 
JavaScript Testing VIA Selenium
JavaScript Testing VIA SeleniumJavaScript Testing VIA Selenium
JavaScript Testing VIA Selenium
 
Make JavaScript Faster
Make JavaScript FasterMake JavaScript Faster
Make JavaScript Faster
 
Getting started with Selenium 2
Getting started with Selenium 2Getting started with Selenium 2
Getting started with Selenium 2
 
How to speed up your website?
How to speed up your website?How to speed up your website?
How to speed up your website?
 
Creating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPressCreating SmartPhone Apps Using WordPress
Creating SmartPhone Apps Using WordPress
 
Themes that perform short: WordCamp Antwerp 2016
Themes that perform short: WordCamp Antwerp 2016Themes that perform short: WordCamp Antwerp 2016
Themes that perform short: WordCamp Antwerp 2016
 
Vue.js Getting Started
Vue.js Getting StartedVue.js Getting Started
Vue.js Getting Started
 
Performance.now() fast but not furious
Performance.now()   fast but not furiousPerformance.now()   fast but not furious
Performance.now() fast but not furious
 
What’s New in ASP.NET 4
What’s New in ASP.NET 4What’s New in ASP.NET 4
What’s New in ASP.NET 4
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End Performance
 
High Performance Snippets
High Performance SnippetsHigh Performance Snippets
High Performance Snippets
 
Lighthouse custom audits - London Web Performance 2019
Lighthouse custom audits -  London Web Performance 2019Lighthouse custom audits -  London Web Performance 2019
Lighthouse custom audits - London Web Performance 2019
 

Viewers also liked

Taller Viajes Intro
Taller Viajes IntroTaller Viajes Intro
Taller Viajes Introjescarra
 
Pycrashcourse
PycrashcoursePycrashcourse
Pycrashcourserik0
 
Health Sci Biblioblogosphere 2
Health  Sci  Biblioblogosphere 2Health  Sci  Biblioblogosphere 2
Health Sci Biblioblogosphere 2Marcus Banks
 
Python intro
Python introPython intro
Python introrik0
 
Blitzweekend
BlitzweekendBlitzweekend
Blitzweekendheri
 
Game theory
Game theoryGame theory
Game theoryrik0
 
Complex and Social Network Analysis in Python
Complex and Social Network Analysis in PythonComplex and Social Network Analysis in Python
Complex and Social Network Analysis in Pythonrik0
 

Viewers also liked (8)

Taller Viajes Intro
Taller Viajes IntroTaller Viajes Intro
Taller Viajes Intro
 
Valentines Day
Valentines DayValentines Day
Valentines Day
 
Pycrashcourse
PycrashcoursePycrashcourse
Pycrashcourse
 
Health Sci Biblioblogosphere 2
Health  Sci  Biblioblogosphere 2Health  Sci  Biblioblogosphere 2
Health Sci Biblioblogosphere 2
 
Python intro
Python introPython intro
Python intro
 
Blitzweekend
BlitzweekendBlitzweekend
Blitzweekend
 
Game theory
Game theoryGame theory
Game theory
 
Complex and Social Network Analysis in Python
Complex and Social Network Analysis in PythonComplex and Social Network Analysis in Python
Complex and Social Network Analysis in Python
 

Similar to Django for n00bs

* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, DeveloperLinuxmalaysia Malaysia
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesTikal Knowledge
 
Web driver selenium simplified
Web driver selenium simplifiedWeb driver selenium simplified
Web driver selenium simplifiedVikas Singh
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Componentssonumanoj
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIEric Wise
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaSandeep Tol
 
Building a dynamic SPA website with Angular
Building a dynamic SPA website with AngularBuilding a dynamic SPA website with Angular
Building a dynamic SPA website with AngularFilip Bruun Bech-Larsen
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in DjangoLakshman Prasad
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)Abhishek Anand
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in SalesforceJitendra Zaa
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...Paul Jensen
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsWebStackAcademy
 
Javascript SEO Devs and SEOs playing nicely
Javascript SEO Devs and SEOs playing nicelyJavascript SEO Devs and SEOs playing nicely
Javascript SEO Devs and SEOs playing nicelyPeter Mead
 
A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...Carlos de la Guardia
 

Similar to Django for n00bs (20)

* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
 
Django Girls Tutorial
Django Girls TutorialDjango Girls Tutorial
Django Girls Tutorial
 
Web driver selenium simplified
Web driver selenium simplifiedWeb driver selenium simplified
Web driver selenium simplified
 
Implementing Vanilla Web Components
Implementing Vanilla Web ComponentsImplementing Vanilla Web Components
Implementing Vanilla Web Components
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
AngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPIAngularJS Fundamentals + WebAPI
AngularJS Fundamentals + WebAPI
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in Java
 
Building a dynamic SPA website with Angular
Building a dynamic SPA website with AngularBuilding a dynamic SPA website with Angular
Building a dynamic SPA website with Angular
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)AngularJS Introduction (Talk given on Aug 5 2013)
AngularJS Introduction (Talk given on Aug 5 2013)
 
Lightning Web Component in Salesforce
Lightning Web Component in SalesforceLightning Web Component in Salesforce
Lightning Web Component in Salesforce
 
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
End to end testing Single Page Apps & APIs with Cucumber.js and Puppeteer (Em...
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
Fame
FameFame
Fame
 
Javascript SEO Devs and SEOs playing nicely
Javascript SEO Devs and SEOs playing nicelyJavascript SEO Devs and SEOs playing nicely
Javascript SEO Devs and SEOs playing nicely
 
Sitecore mvc
Sitecore mvcSitecore mvc
Sitecore mvc
 
A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...A winning combination: Plone as CMS and your favorite Python web framework as...
A winning combination: Plone as CMS and your favorite Python web framework as...
 
Continuous deployment
Continuous deploymentContinuous deployment
Continuous deployment
 

Recently uploaded

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
[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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
[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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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...
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Django for n00bs

  • 1. Jen Zajac @jenofdoom [email_address] Django for n00bs
  • 3. What is a framework? Photo credit: http://www.flickr.com/photos/ikhlasulamal/2331176652/
  • 4.
  • 5. Some backstory Photo credit: http://www.flickr.com/photos/scottummy/4971054099/
  • 6.
  • 7. So why would I pick Django? Photo credit: http://www.sxc.hu/photo/495550 (apologies for aspect ratio)
  • 8.
  • 9. MVC: Models, Views, Controllers Photo credit: http://www.flickr.com/photos/helloturkeytoe/5781708201
  • 10.
  • 11. Setting up a project Photo credit: http://www.flickr.com/photos/thedailyenglishshow/6013713229/ Disclaimer! The following slides were not in my talk: I did a bit of a live demo instead. So these aren’t 100% complete, just a flavour of my talk.
  • 12. It worked! So, I’m not going to cover installing Django… it’s really easy to get a local set-up, just follow the installation docs on the Django site. When you’ve done that you should end up with this, once you run the test server:
  • 13.
  • 14.
  • 15. We can use our admin interface to add data
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. And it should then display
  • 21.
  • 22. In Conclusion Photo credit: http://www.flickr.com/photos/wonderferret/306390009/
  • 23.

Editor's Notes

  1. Hi. My name is Jen, you can find me on twitter as @jenofdoom . I work at Catalyst IT as a web developer. I&apos;m here today to talk to you about the Django web framework at quite an introductory level, i.e. for n00bs.
  2. There are two potential audiences for this talk: those of you who are familar with Python and have used other frameworks but don&apos;t have any experience with Django, and are looking to simply learn what extra Django might offer; and those of you who might have used other frameworks or content mangement systems but haven&apos;t used Python before. I&apos;m going to try and cater for both of those groups in this talk (possibly focusing on slightly on the later), but of course the caveat of this is that I may not go into quite the same level of detail that I would be able to if I was targeting one group over the other, so if you have any questions please feel free to ask them at the end. I personally feel that if you are new to Python as a language, as long as you have some experience with a programming language of some description and you understand basic control flow stuctures, Django is an excellent gateway drug to serve as introduction to Python for the web, as it does a great job of handling a lot of the intial futzing around with configuration and allowing you to just get on with writing code that does stuff, quickly. There are plenty of great resources for picking up Python available online and I&apos;d recommend just taking a basic language tutorial to make sure you&apos;ve got the concepts down before starting with Django. I myself am a long way from being a Python expert of any description, but I do use it for my day job and I&apos;m a big fan as it lets me Get Stuff Done.
  3. So what, exactly, is a framework? I&apos;m sure most of you know already, but here&apos;s a quick refresher: &amp;quot;A web application framework is a software framework that is designed to support the development of dynamic websites, web applications and web services. The framework aims to alleviate the overhead associated with common activities performed in Web development. For example, many frameworks provide libraries for database access, templating frameworks and session management, and they often promote code reuse.&amp;quot; source: the ever ubiqutous wikipedia http://en.wikipedia.org/wiki/Web_framework Really though, putting this quote aside, I feel like this picture does a pretty good job of explaining what a framework is – it’s a basic structure that you can then build upon further.
  4. Some of you may be more familiar with the concept of a Content Management System when you think about web applications, such as Drupal or Joomla etcetera. These CMS&apos;s have great advantages when it comes to getting up and running and solving common functionality needs quickly, but if you are doing something really bespoke they are definitely lacking, requiring a lot of wrangling to make them do what you want to do, and using up a lot of additional overhead for functionality you may not find of use. Conversly, a framework is a lot more bare bones. You are going to have to do a bunch more work to get up and running, but because you are putting in only the code that is relevant to your aims, you have a lot more flexibility and hopefully you will end up with a much leaner application.
  5. Django originated at the Lawrence Journal-World newspaper in 2003. In the summer of 2005 it was released as an open source project. Yes, it is named after Django Reinhart, the guitarist. Django took a big step forwards in maturity with the release of version 1.0 back in 2008, and it&apos;s now up to version 1.3 with a major release roughly once a year.
  6. Of course, Django is not the only web framework. Ruby on Rails is a big fish of course, and on the Python side of things we have not only Django but also a handful of other frameworks. Briefly, some of these are: Pyramid (Pylons) -&gt; Pyramid is the result of a merger between repoze.bfg and Pylons, and it&apos;s a lightweight framework that offers very good performance plus a modular approach to choosing for example, if you want routes or url traversal, or if you want mako or chameleon templates. It&apos;s much more bare bones than Django and generally you will be writing some code to glue things together. Zope -&gt; Zope has been around for quite a long time and has branched of into a bunch of different project such as BlueBream. Zope includes ZODB, an object database for Python, plus a bunch of standard libraries. Bottle -&gt; Bottle is more of a micro-framework for very small webapps. There are a bunch of these, such as CherryPy, and typically they don&apos;t provide much beyond some basic url dispatching and an http server to build-your-own on top of. TurboGears - &gt; I confess I don&apos;t know that much about TurboGears, but it takes a similar approach to Django in that it is a &apos;full stack&apos; solution, except it&apos;s using open sourced components. It&apos;s now built on top of pyramid I believe.
  7. So why would I pick Django over these other frameworks?
  8. Biggest fish -&gt; Perhaps this seems a bit self-evident, but one major advantage is that Django is pretty popular. More users means more people to ask for help if you get stuck. It also means there is a nice big community of folks writing tutorials and creating add-ons. Tightly Intergrated Components -&gt; Django takes a very much all-in-one, batteries-included type of approach. The url dispatcher, object realational model, template system etcetra all come as part of the package, and they are all specific to Django. The great advantage this offers is that everything meshes together really well. Admin interface -&gt; In terms of wow-factor when you are demoing Django, the built in admin interface is defnietly one of the nicest features. We&apos;re going to have a look in a minute at how easy it is to get this up and running. Documentation -&gt; Django has really nice, pretty, well-written, logical documentation. I really can&apos;t praise it enough. It&apos;s both easy to understand for newcomers and offers plenty of depth for those needing technical information. Well thought our release process -&gt; Django does a really good job of giving you plenty of advance notice about what features are going to be changed or deprcated two or three major releases away. The release notes offer solid advice about what you need to do to get your existing apps up to date. Authentication &amp; security -&gt; Finally, it&apos;s great to have all your user authentication and permissioning taken care of out of the box, as well as CRSF protection. As with a bunch of the features mentioned above, if you don&apos;t want to use it, it&apos;s realy easy to turn off and substitute something else. Of course, for some people and some situations, some of these upsides could be considered as downsides. There has been some criticism leveled at Django with regards to the amount of its functionality that was created from scratch as opposed to using already established open source componements. This could in theory take folks away from the established components, and generally reduces interoperability. There is essentially only a small core group of people that actually guide Django, and there is some feeling that if your thoughts don&apos;t match their intent you need to be be prepared for a little frustration that features you care about won&apos;t get folded in. Right now Django is Python 2.x only. It seems likely that eventually Django will support Python 3, but it could be a long time coming due to their release process&apos; ongoing support of deprecated features through at least a couple of major version changes. Personally I don&apos;t feel like any of these concerns are significant enough to impact my use case, but your mileage may vary.
  9. We&apos;re just going to pause for a second here before we dive into setting up a project. Hopefully most of you are already familiar with the MVC model, which most Python based frameworks use. Briefly, when we lay out an application in an Models-Views-Controllers way, we split up the application into layers, keeping presentation seperate from the program logic, and keeping that separate from the data model.
  10. One gotcha to those of you coming from other MVC frameworks is that Django has a slightly different interpretation of what MVC means. Django&apos;s approach could more accurately be described as &apos;MTV&apos; (nope, not the channel), which is: Models, Templates, Views. Basically, in Django&apos;s inteterpretation, the &apos;view&apos; describes the data that gets presented to the user, i.e. it is a Python callback function for a particular URL. Then all the presentation gets seperated out into the templates, as I&apos;ll show you.
  11. OK, I think that&apos;s enough bullet points for now, I think it&apos;s about time we got our hands dirty. So here&apos;s an incredibly brief look at getting a project up and running with Django. Ok, so let&apos;s pretend we&apos;re creating a simple website for a group of friends to be able to log in and vote on movies that they want to see when they next hang out, to save a bunch of arguements on the night.
  12. Right, so getting Django set up locally for development is pretty straightforwards, you can follow the instructions on the Django site to get in installed so I&apos;m not going to cover that. For similar reasons, I won&apos;t cover initial project setup as I want to just jump straight in to actaully making a site just to give you a taster of that.
  13. I wanted to cover forms as wel,, but alas no time!
  14. I love frameworks because they allow me to build a project hey way I want it to be built. I&apos;m a big fan of Django in particular because it’s so quick to get up and running. My first introduction to Django was a 15 minute youtube video which showed someone putting together a simple wiki system. This talk is my attempt to pay forward some of the excitement I felt watching that initial demo. I hope that your have found it useful.