Django Introduction, Dev in Rio 2009

7,522 views

Published on

Published in: Technology, Travel
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,522
On SlideShare
0
From Embeds
0
Number of Embeds
27
Actions
Shares
0
Downloads
82
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide

Django Introduction, Dev in Rio 2009

  1. 1. The web framework for perfectionists with deadlines. Jacob Kaplan-Moss http://jacobian.org/
  2. 2. Revsys
  3. 3. History
  4. 4. Kansas
  5. 5. Map
  6. 6. Wizard of Oz
  7. 7. Not as bad as you think
  8. 8. Lawrence, Kansas
  9. 9. Bookstore
  10. 10. Music
  11. 11. Free state http://www.flickr.com/photos/34022876@N06/3189863029
  12. 12. Basketball
  13. 13. LJW
  14. 14. Adrian/Simon
  15. 15. The Inside of Love Events Latest Music Movies Search Food Nightlife Home More Login Best bets Distant early warnings Your bets Bad Veins / Division Day This Cincinnati duo — plus a reel-to-reel tape machine named Irene — perform dense pop and rock compositions with strong beats and lots of bells and whistles... Today at 10:00pm The Replay Lounge, $2 - $3 Today's events Search events The Inside of Love Most discussed Katlyn Conroy explores the idea of home on her solo album "I Think I'll Stay Inside" Event Next time you see Katlyn Conroy out and about and having fun, tell her to go home. That’s Sidewise / Left On Northwood / Viper Room where she makes her best music, and it’s the reason she came up with a lovely new solo Dance Floor / Harlequin Shade Theory
  16. 16. The Inside of Love Events Latest Music Movies Search Food Nightlife Home More Login Best bets Distant early warnings Your bets Bad Veins / Division Day This Cincinnati duo — plus a reel-to-reel tape machine named Irene — perform dense pop and rock compositions with strong beats and lots of bells and whistles... Today at 10:00pm The Replay Lounge, $2 - $3 Today's events Search events The Inside of Love Most discussed Katlyn Conroy explores the idea of home on her solo album "I Think I'll Stay Inside" Event Next time you see Katlyn Conroy out and about and having fun, tell her to go home. That’s Sidewise / Left On Northwood / Viper Room where she makes her best music, and it’s the reason she came up with a lovely new solo Dance Floor / Harlequin Shade Theory
  17. 17. All the cool buzzwords
  18. 18. Events Latest Music Movies Search Food Nightlife Home More Login Search music Search Local bands Mp3s Also check out our top downloads page, list of bands, and user playlists. Song Band Date posted "Return Of Nature" Katlyn Conroy September 13, 2009 Add to playlist "Horror Stories" Katlyn Conroy September 13, 2009 Add to playlist "Valentine" Get Up Kids September 4, 2009 Add to playlist "Format" Steddy P August 28, 2009 Add to playlist "This Is How" John Nolan August 12, 2009 Add to playlist "Bering Sea" John Nolan August 12, 2009 Add to playlist "Not to Let Go" John Nolan August 12, 2009 Add to playlist "Salt" Sailor Sequence July 14, 2009 Add to playlist September events MP3 "Thrash the System" Max Justus July 8, 2009 Add to playlist S M T W T F S "Spies" Miss Allison Olassa and June 25, 2009 Add to playlist Co. 30 31 1 2 3 4 5 "Pretty Flowers" Miss Allison Olassa and June 25, 2009 6 7 8 9 10 11 12 Add to playlist Co. 13 14 15 16 17 18 19
  19. 19. Events Latest Music Movies Search Food Nightlife Home More Login lawrence.com's RSS feeds Below is a list of most of the news (or "RSS") feeds that Lawrence.com has to offer. These feeds are automatically updated when we make updates to the site. To find out more about Lawrence.com's news feeds, read our FAQ. Event calendar Best bets Podcasts Street Level Punditocracy All podcasts Mp3s Recently added MP3s Blogs Each blog has its own feed, and a feed with the latest post from all blogs is also available. (See September events all blog pages.) S M T W T F S Full blogs feed Let's Talk Sex 30 31 1 2 3 4 5 RSS Fear of a Neutral Planet 6 7 8 9 10 11 12 Cup o' Joel Gamer 13 14 15 16 17 18 19 Venues 20 21 22 23 24 25 26 We have a feed of the events at each venue. Some of the most popular venues are listed 27 28 29 30 1 2 3
  20. 20. Events Latest Music Movies Search Food Nightlife Home More Login Punditocracy ibe via RSS a iTunes Roll Models A new season of flying fishnets and sharp elbows is underway for those derby vixens of the Kansas City Roller Warriors. Lauren Taylor, a.k.a. Auntie Embolism, joined us to discuss their upcoming bout and the face-smashing feminism of our very ... Share Discuss By Gavon Laessig May 28, 2009 6 a.m. Ball of the Wild The rubber-walloping weekend warriors of Kaw Valley Kickball League are back. While the kingly pursuit of kickball has sprouted leagues across the nation, KVKL has developed a distinctly Lawrencian character all its own. This rich pageantry of townies, pre-pubescent sport, ... Share Discuss By Gavon Laessig May 27, 2009 1:59 a.m. Mark of the Beast Podcasts Charles S. McVey joins us to discuss his new album,"Animal," and getting peed on by Jesus. (CAUTION: This interview may contain backwards messages.) Share Discuss By Gavon Laessig April 24, 2009 1:50 a.m. Latest podcasts Teen Titans of Cinema Could high school students make the next “Citizen Kane”? Well, realistically, probably not. But it’s The Inside of Love: An Interview with
  21. 21. Drunk college students
  22. 22. Deadwood edition
  23. 23. PHP
  24. 24. http://flickr.com/photos/scragz/134084915/
  25. 25. http://flickr.com/photos/dnorman/126129736/
  26. 26. Grown, not designed.
  27. 27. abs() apd_dump_regular_resources() array_splice() acos() apd_echo() array_sum() acosh() apd_get_active_symbols() array_udiff() addcslashes() apd_set_pprof_trace() array_udiff_assoc() addslashes() apd_set_session() array_udiff_uassoc() aggregate() apd_set_session_trace() array_uintersect() aggregate_info() apd_set_socket_session_trace() array_uintersect_assoc() aggregate_methods() array() array_uintersect_uassoc() aggregate_methods_by_list() array_change_key_case() array_unique() aggregate_methods_by_regexp() array_chunk() array_unshift() aggregate_properties() array_combine() array_values() aggregate_properties_by_list() array_count_values() array_walk() aggregate_properties_by_regexp() array_diff() array_walk_recursive() aggregation_info() array_diff_assoc() ArrayIterator::current() apache_child_terminate() array_diff_key() ArrayIterator::key() apache_get_modules() array_diff_uassoc() ArrayIterator::next() apache_get_version() array_diff_ukey() ArrayIterator::rewind() apache_getenv() array_fill() ArrayIterator::seek() apache_lookup_uri() array_fill_keys() ArrayIterator::valid() apache_note() array_filter() ArrayObject::__construct() apache_request_headers() array_flip() ArrayObject::append() apache_reset_timeout() array_intersect() ArrayObject::count() apache_response_headers() array_intersect_assoc() ArrayObject::getIterator() apache_setenv() array_intersect_key() ArrayObject::offsetExists() apc_add() array_intersect_uassoc() ArrayObject::offsetGet() apc_cache_info() array_intersect_ukey() ArrayObject::offsetSet() apc_clear_cache() array_key_exists() ArrayObject::offsetUnset() apc_compile_file() array_keys() arsort() apc_define_constants() array_map() ascii2ebcdic() apc_delete() array_merge() asin() apc_fetch() array_merge_recursive() asinh() apc_load_constants() array_multisort() asort() apc_sma_info() array_pad() aspell_check() apc_store() array_pop() aspell_check_raw() apd_breakpoint() array_product() aspell_new() apd_callstack() array_push() aspell_suggest() apd_clunk() array_rand() assert() apd_continue() array_reduce() assert_options() apd_croak() array_reverse() atan() apd_dump_function_table() array_search() atan2() apd_dump_persistent_resources() array_shift() atanh() array_slice()
  28. 28. “ PHP is the devil. ” — David Heinemeier Hansson Ruby on Rails
  29. 29. “The CMS”
  30. 30. http://flickr.com/photos/malweth/196526482/
  31. 31. http://flickr.com/photos/drift-words/48739695/
  32. 32. http://flickr.com/photos/goldberg/107095332/
  33. 33. Philosophy
  34. 34. Make development fast
  35. 35. Automate repetitive tasks
  36. 36. Best practices
  37. 37. “ The ink is never dry on these babies. ” — Adrian Holovaty
  38. 38. March 2005
  39. 39. PyCon 2005
  40. 40. Rails
  41. 41. “Meet Django”
  42. 42. IPO: July 2005
  43. 43. September 2008
  44. 44. Home Downloa Django 1.1 released After nearly a year of development, lots of new features and thousands of other improvements, Django 1 here and ready for prime time! For a full rundown of what's new and what's changed, consult the release notes; to grab a copy, swing b the Django download page. And for the security-conscious, signed checksums for the release tarball are available. This release also contains the security update rolled out earlier tonight for older release series. Django 1.1 is the result of hard work by hundreds of people who've contributed code to Django and man more who've donated their time to reporting, triaging, tracking down and helping to fix bugs and develop new features. Django literally would not be able to happen without all of you, so stop and give yourselve (and any other contributors you know) a pat on the back. July 2009 Thanks once again to everyone who's helped out, and we hope to see you all at DjangoCon 2009 in Portl Oregon, and all along the path to Django 1.2. Posted by James Bennett on July 29, 2009
  45. 45. http://www.flickr.com/photos/tejedoro_de_luz/3157690060/ 5½ years old, 4 as open source.
  46. 46. 600+ contributors.
  47. 47. Majority of features community contributed. http://www.flickr.com/photos/aidan_jones/3575000735
  48. 48. Stable APIs. http://www.flickr.com/photos/chris_bell/3164537665/
  49. 49. Forward-compatible. http://www.flickr.com/photos/tjblackwell/2807009000
  50. 50. http://flickr.com/photos/orinrobertjohn/22452221/
  51. 51. MVC?
  52. 52. Model
  53. 53. from django.db import models class Photo(models.Model):
  54. 54. from django.db import models class Photo(models.Model): image = models.ImageField()
  55. 55. from django.db import models class Photo(models.Model): image = models.ImageField() title = models.CharField(max_length=150)
  56. 56. from django.db import models class Photo(models.Model): image = models.ImageField() title = models.CharField(max_length=150) uploaded = models.DateTimeField()
  57. 57. >>> Photo.objects.all() >>> Photo.objects.filter( ... uploaded = datetime.date.today() ... ) >>> Photo.objects.filter( ... title__startswith = "pants", ... uploaded__lte = some_date) ... )
  58. 58. from django.contrib import admin from myapp.models import Photo admin.site.register(Photo, list_display = ['photo', 'title'], date_hierarchy = 'date_uploaded', )
  59. 59. URLs
  60. 60. http://flickr.com/photos/rightee/4357183/
  61. 61. page.php script.cgi?pageid=144 StoryPage.aspx
  62. 62. 0,2097,1-1-30-72-407- 4752,00.html
  63. 63. photos/ photos/14/
  64. 64. urlpatterns = patterns('myapp.views', ("^photos/$", "photo_index"), ("^photos/(d+)/$", "photo_detail"), )
  65. 65. View
  66. 66. from
django.http
import
HttpResponse def
view(request): 



return
HttpResponse("Hello, Rio!")
  67. 67. from
myapp.models
import
Photo from
django.shortcuts
import
render_to_response def
photo_index(request): 



return
render_to_response(         template
=
"photos/index.html",
 







context
=
{ 











'photo_list'
:
Photo.objects.all() 







} 



)
  68. 68. Template
  69. 69. http://flickr.com/photos/ok-59/32955331/
  70. 70. {%
extends
"base"
%}
  71. 71. {%
extends
"base"
%}
  72. 72. {%
extends
"base"
%} {%
block
content
%}
  73. 73. {%
extends
"base"
%} {%
block
content
%} 

<h1>{{ photo.title }}</h1>
  74. 74. {%
extends
"base"
%} {%
block
content
%} 

<h1>{{ photo.title }}</h1> 

<img
src="{{ photo.get_image_url }}"
/>
  75. 75. {%
extends
"base"
%} {%
block
content
%} 

<h1>{{ photo.title }}</h1> 

<img
src="{{ photo.get_image_url }}"
/> {%
endblock
%}
  76. 76. Admin interface
  77. 77. Admin interface Generic views
  78. 78. Admin interface Generic views Testing tools
  79. 79. Admin interface Generic views Testing tools Forms
  80. 80. Admin interface Generic views Testing tools Forms Sessions
  81. 81. Admin interface Generic views Testing tools Forms Sessions Authentication/ authorization
  82. 82. Admin interface Generic views Testing tools Forms Sessions Authentication/ authorization Caching
  83. 83. Admin interface Îñtërnâtiônàlizætiøn Generic views Testing tools Forms Sessions Authentication/ authorization Caching
  84. 84. Admin interface Îñtërnâtiônàlizætiøn Generic views RSS Testing tools Forms Sessions Authentication/ authorization Caching
  85. 85. Admin interface Îñtërnâtiônàlizætiøn Generic views RSS Testing tools Support for legacy Forms databases Sessions Authentication/ authorization Caching
  86. 86. Admin interface Îñtërnâtiônàlizætiøn Generic views RSS Testing tools Support for legacy Forms databases Sessions CSRF protection Authentication/ authorization Caching
  87. 87. Admin interface Îñtërnâtiônàlizætiøn Generic views RSS Testing tools Support for legacy Forms databases Sessions CSRF protection Authentication/ File storage authorization Caching
  88. 88. Admin interface Îñtërnâtiônàlizætiøn Generic views RSS Testing tools Support for legacy Forms databases Sessions CSRF protection Authentication/ File storage authorization &c. Caching
  89. 89. Home Download Documentation Weblog Community Code This document describes Django version 1.1. For development documentation, go Search here. Latest 1.0 0.96 All Django documentation Browse Everything you need to know about Django (and then some). Table of contents General Index First steps Global Module Index Getting help From scratch: Overview | Installation Having trouble? We’d like to help! Tutorial: Part 1 | Part 2 | Part 3 | Part 4 You are here: Try the FAQ – it’s got answers to many Django 1.1 documentation common questions. The model layer Django documentation Looking for specific information? Try Models: Model syntax | Field types | Meta options the Index, Module Index or the detailed Last update: QuerySets: Executing queries | QuerySet method table of contents. September 13, 2009, 1:45 a.m. (CDT) reference Search for information in the archives Model instances: Instance methods | Accessing of the django-users mailing list, or post related objects a question. Advanced: Managers | Raw SQL | Transactions | Ask a question in the #django IRC Aggregation | Custom fields channel, or search the IRC logs to see if its been asked before. Other: Supported databases | Legacy databases | Providing initial data Report bugs with Django in our ticket tracker. The template layer For designers: Syntax overview | Built-in tags and filters For programmers: Template API | Custom tags and filters The view layer
  90. 90. django wiki mercurial documentation mailing list twitter presentations A world-class geographic web framework GeoDjango
  91. 91. “ GeoDjango … is undoubtedly the most sophisticated GIS functionality in any web framework in any language or platform. — Ted Leung ” http://bit.ly/Q91EW
  92. 92. Main Documentation Store Gallery Blog Demo Store Welcome to Satchmo More information Some helpful links Have you been looking for a solid open source framework to build your online store? Django Do you need a customized shopping cart built with Python? Google Group(Users) Do you need to add a Django based shopping cart to an existing site? Google Group(Developers) Satchmo If you answer Yes, to any of these, then Satchmo might be the right tool for you. Satchmo's mission is to use Django to Satchmo on Ohloh create an open source framework for creating unique and robust online stores. To provide maximum flexibility, Satchmo is Satchmo on Freshmeat licensed under the BSD license. #satchmo irc channel Satchmo 0.8.1 was released on December 15th, 2008. Please use this link to download the most recent version. How to help Most Recent News Here's some more information on how to August 19, 2009 - Satchmo Presentations help us out July 14, 2009 - Satchmo Success Stories June 22, 2009 - Satchmo Site Upgrade Development Process May 15, 2009 - Satchmo Diaries December 15, 2008 - Satchmo 0.8.1 Release November 28, 2008 - Using Django Permissions Site Feeds November 25, 2008 - Satchmo 0.8 Release September 15, 2008 - Satchmo DjangoCon Video Available Latest Blog Posts September 11, 2008 - Thoughts from DjangoCon 2008 July 20, 2008 - Satchmo at DjangoCon Get Code Active Satchmo Stores Satchmo 0.8.1 Release Here are some live stores that are currently using Satchmo. Feel free to visit but these are live so do not place orders Snapshots unless you really want to purchase the products. Please view the whole list here. Mercurial Instructions
  93. 93. a platform for rapidly developing websites “ everyone is currently rebuilding this stuff over and over again and rationalizing it as some sort of secret sauce competitive advantage when it's really infrastructure - stuff that really should be standardized so you can actually get around to doing the new and interesting stuff. ” — Leonardo Lin, Pinax Co - Founder, Upcoming.org or browse the documentation About Pinax Pinax is an open -source platform built on the Django Web Framework . By integrating numerous reusable Django apps to take care of the things that many sites have in common, it lets you focus on what makes your site different. Video of Talk on Pinax at PyCon 2009 Video of Talk on Pinax at DjangoCon 2008 While our initial development was focused around a demo social networking site, Pinax is suitable for a wide variety of websites. We are working on number of editions tailored to intranets, event management, learning management, software project management and more. If you have any questions about the Pinax project, please contact James Tauber.
  94. 94. “There’s an app for that” http://www.flickr.com/photos/joelaz/2868356069
  95. 95. Who uses Django?
  96. 96. Journalism Lawrence Journal-World Los Angeles Times New York Times Scripps Washington Post
  97. 97. Home Articles Truth-O-Meter Obameter Flip-O-Meter People First 100 Days Search PolitiFact Monday, June 15th, 2009 The Czar Administration Sen. John McCain contends President Obama has more czars than the Romanovs did in Russia. We take a stab at counting the Obama czars and then dig into the history books to see if McCain is right. >>more More from PolitiFact: Palin says thanks but no thanks for stimulus money Tracking Obama!s promises Has the government turned a profit from bank Promise Kept 30 money? Compromise 8 Of signing statements and whistleblowers Gingrich earns Pants on Fire for stimulus claim Promise Broken 6 Stalled 10 Two of the Romanov czars. (There were 18 of them; they did not have a Stimulus In the Works 65 Accountability Czar.) No Action 396 PolitiFact will be tracking Barack Obama’s promises during his presidency and will be rating the progress of each one. >>more The Truth-O-Meter TM Promises we have rated recently A scorecard separating fact from fiction No. 240: Tougher rules "Ob a m a h a s m ore c za rs th a n th e against revolving door for lobbyists R om a novs." and former officials Is Obama the Czar Czar? No. 516: John McCain No signing statements to nullify U nd e r a pub lic h e a lth c a re option, 120 instructions from m illion Am e ric a ns will "lose wh a t th e y now Congress
  98. 98. Home Articles Truth-O-Meter Ob Monday, June 15th, 2009 The Czar Administratio
  99. 99. Home Articles Truth-O-Meter Ob Monday, June 15th, 2009 The Czar Administratio
  100. 100. “Web 2.0”
  101. 101. 10 million visitors per month
  102. 102. “ After an extensive trade study, we selected Django … as the first and primary application environment for the Nebula Cloud. ” http://nebula.nasa.gov/services/framework
  103. 103. Data analysis Rapid prototyping Intranet applications Web services System integration
  104. 104. Centrum Globo Google Orbitz RapidSMS VMWare ...
  105. 105. Thank you! Me: Jacob Kaplan-Moss Django: http://djangoproject.com Email: jacob@jacobian.org Twitter: @jacobian

×