Django - the first five years

40 %
60 %
Information about Django - the first five years
Technology

Published on December 18, 2008

Author: jacobian

Source: slideshare.net

The first five years Jacob Kaplan-Moss Google, December 16, 2008 http://jacobian.org/speaking/2008/first-five-years/

“ Good software takes ten years. Get used to it. — Joel Spolsky ” http://www.joelonsoftware.com/articles/fog0000000017.html

Halfway there! http://flickr.com/photos/usonian/257403571/

Kansas

Merry Slickmas Events Latest Music Movies Food Nightlife Best bets Upcoming quot;A Benefit for Charley's Fingerquot; with The Dactyls / Naomi What? Charlie Downey is a baller. He's so badass that he broke his finger in two places when one of his shots got stuffed Today at 10:00pm The Jackpot Music Hall, $5 Today's events Search events Staph blogs O Caption! My Caption! The Dog and Pony Show Loafers of Mass Destruction 13 comments Hark! The Local Musicians Sing!: New Christmas albums from Sam Billen and Josh Atkinson Scene Stealers Sam Billen’s “Merry Christmas” and Josh Atkinson’s “Songs for Christmas” rank right up 'Synecdoche, New York' tackles life’s there with recent yuletide blessings from Sufjan Stevens and Low. Both albums strip away complexity with complexity

“ In the beginning there was Zope. Zope was a web application framework ... but it had some discontents who dared to call it quot;monolithicquot; and quot;unpythonicquot;. And behold, then there came Webware, and it was Modular.... But others rebelled ... and a Ton of frameworks appeared: Quixote ... SkunkWEB ... ” CherryPy ... and some thirteen others. — Mike Orr http://linuxgazette.net/113/orr.html

2003

2008

r36 cms/apps/polls/ r84 cms/core/validators.py r159 cms/core/paginator.py r327 cms/apps/auth/ r390 cms/core/urlresolvers.py r630 cms/core/sites.py

February 2004 circa r1000

cms/apps/polls/poll.py

>>>
from
cms.apps.polls.polls
import
Poll >>>
p
=
Poll(4,
quot;hiquot;,
date(2004,
1,
1),
...) >>>
p.save()

cms/apps/polls/polls.py

cms/apps/polls/polls.py

cms/apps/polls/dblayout.sql

httpd.conf

cms/conf/mrmustard/polls.py

cms/views/polls/polls.py

Data class Admin view Data-access function(s) Admin template Admin URLs

cms/datadescriptions/polls.py

./generate_code.py
polls

apps/ polls.py sql/ polls.sql views/ admin/ polls.py templates/ admin/ polls/ change_list.html add_form.html change_form.html

cms/utilities/codegeneration/generation.py

cms/datadescriptions/polls.py

DO
NOT
EDIT
THIS
FILE
MANUALLY. IT
WAS
GENERATED
BY
A
PROGRAM. RE‐RUN
THE
CODE
GENERATOR
INSTEAD.

Seven months later... October 2004

cms/models/polls.py

PyCon 2005

Rails

class
Poll(meta.Model): 



fields
=
( 







meta.SlugField('slug',
'slug',
unique_for_month='pub_dat 







meta.CharField('question',
'question',
maxlength=255), 







meta.DateTimeField('pub_date',
'date
published'), 







meta.DateTimeField('expire_date',
'expiration
date'), 







meta.ManyToManyField(core.Site), 







meta.PositiveSmallIntegerField('choice_votes',
'choice
v 



) 



db_table
=
polls 



ordering
=
('‐pub_date',) 



get_latest_by
=
'pub_date'

class
Poll(meta.Model): 



slug
=
meta.SlugField(unique_for_month='pub_date') 



question
=
meta.CharField(maxlength=255) 



pub_date
=
meta.DateTimeField('date
published') 



expire_date
=
meta.DateTimeField('expiration
date') 



sites
=
meta.ManyToManyField(core.Site) 



choice_votes
=
meta.PositiveSmallIntegerField(default=1) 



class
META: 







db_table
=
'polls' 







ordering
=
('‐pub_date',)

“ I can't think of any other backwards-incompatible changes that we're planning before 1.0 (knock on wood). If this isn't the last one, though, it's at least the last major one. — Adrian, August 2005 ” http://www.djangoproject.com/weblog/2005/aug/25/modelsyntax/

Before: from
django.models.polls
import
Poll After: from
myapp.models
import
Poll

Before: ...
magic!
... After: import
datetime

Before: class
Poll(meta.Model): 



class
META: 







admin
=
meta.Admin( 











list_display
=
('title'), 







) After: class
Poll(meta.Model): 



class
Admin 







list_display
=
('title')

Before: from
django.models.polls
import
polls polls.get_list(slug__exact='slug') After: from
polls.models
import
Poll Poll.objects.filter(slug='slug')


339
files
changed,
 22290
insertions(+),
 15656
deletions(‐)

“ After this merge, Django 1.0 can’t be far off. — Bill de hÓra ” http://www.dehora.net/journal/2006/04/django_magic_merging.html

“0.95”

django.newforms django.test

18 months

3,094 commits + branches

1,370 from the community

230 new AUTHORS

2,120 bugs fixed


1,394
files
changed,
 28,3237
insertions(+),
 97,036
deletions(‐)

40,000 lines of new documentation

4 new full committers

Unicode

QSRF

NFA

GeoDjango

ModelForms

Autoescaping

Django on Jython (Thanks, Google!)

... and much more ... http://docs.djangoproject.com/en/dev/releases/1.0/

API stability & forwards-compatability http://docs.djangoproject.com/en/dev/misc/api-stability/

Formal release process http://docs.djangoproject.com/en/dev/internals/release-process/

What’s next?

Django 1.1 March 16, 2009

Django 1.1 Roadmap http://code.djangoproject.com/wiki/Version1.1Roadmap

ORM aggregation http://github.com/freakboy3742/django/tree/aggregation

>>>
Book.objects.aggregate( ...




Avg('price'), ...




highest_price
=
Max('price')) {'price_avg':
45.0,
'highest_price':
82.80}

>>>
Author.objects.aggregate(Sum('book__price')) {'book_price_sum':
442}

>>>
books
=
Book.objects.annotate(Max('authors__age')) >>>
books[0].name u'Python
Web
Development
With
Django' >>>
books[0].authors.all() [<Author:
Jeffrey
Forcier
>,
<Author:
Paul
Bissex>,
 <Author:
Wesley
J.
Chun>] >>>
books[0].authors__age__max 37.0

Publisher.objects.annotate(num_books=Count('book__id'))
 
















.filter(num_books__gt=1)
 
















.order_by('num_books')

Improved QuerySet.update()

>>>
Person.objects.update(age=F('age')+1)

Model Validation http://code.djangoproject.com/ticket/6845

>>>
p
=
Person.objects.get(...) >>>
p.age
=
‐7 >>>
p.save(validate=True) Traceback
(most
recent
call
last): 

File
quot;<stdin>quot;,
line
1,
in
<module> ValidationError:
enter
a
number
greater
than
0.

Bulk admin actions http://code.google.com/p/django-batchadmin/

Class-based generic views

from
django.views.generic
import
DetailView class
PersonView(DetailView): 



queryset
=
Person.objects.all() 



 



def
get_template(self,
request): 







return
Template(...)

... and more ... http://code.djangoproject.com/wiki/Version1.1Roadmap

Please help! http://code.djangoproject.com/wiki/Version1.1Roadmap#how-you-can-help

Thank you! jacob@jacobian.org

Add a comment

Related presentations

Related pages

Django: The First Five Years - YouTube

Join one of Django's lead developers on a ride through Django's history. We'll start in Lawrence, Kansas and look at the birth of Django as a ...
Read more

Schipperke Django's first five years - YouTube

First five years of a schipperke's life. ... Schipperke Django's first five years Allen Lewis. Subscribe Subscribed Unsubscribe 0 0. Loading ...
Read more

Django - the first five years - Technology - documents.mx

Calit2 The First Five Years Invited Talk UC Regents San Francisco, CA July 19, 2006 Dr. Larry Smarr Director, California Institute for Telecommunications.
Read more

Django: The First Five Years From Google Tech Talks

Google Tech Talks December 17, 2008 ABSTRACT Join one of Django's lead developers on a ride through Django's history. We'll start in Lawrence, ...
Read more

Django: The First Five Years | Sweet Speeches

Google Tech Talks December 17, 2008. ABSTRACT. Join one of Django's lead developers on a ride through Django's history. We'll start in Lawrence, Kansas and ...
Read more

Django Reinhardt - Wikipedia

Years active: 1928–53: Associated ... Roger Chaput, and Django), including the first recording by the ... Reinhardt's five-piece band ...
Read more

The real-life Django: black Wild West marshal Bass Reeves ...

... could have been an inspiration for Quentin Tarantino’s fictional character Django. ... five years attempting to get ... the first time in six years ...
Read more

Django Unchained (2012) - IMDb

Title: Django Unchained (2012) 8.5 /10. Want to share IMDb's rating on your own site? Use the HTML below. You must be a registered ...
Read more

Django (1966) - IMDb

Title: Django (1966) 7.3 /10. Want to share IMDb's rating on your own site? Use the HTML below. You must be a registered ...
Read more