+ All Categories
Home > Technology > Django - the first five years

Django - the first five years

Date post: 06-May-2015
Category:
Upload: jacob-kaplan-moss
View: 15,821 times
Download: 3 times
Share this document with a friend
Popular Tags:
111
The first five years Jacob Kaplan-Moss Google, December 16, 2008 http://jacobian.org/speaking/2008/first-five-years/
Transcript
Page 1: Django - the first five years

The first five years

Jacob Kaplan-Moss

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

Page 2: Django - the first five years

“”

Good software takes ten years. Get used to it.

— Joel Spolskyhttp://www.joelonsoftware.com/articles/fog0000000017.html

Page 3: Django - the first five years

Halfway there!

http://flickr.com/photos/usonian/257403571/

Page 4: Django - the first five years

Kansas

Page 5: Django - the first five years
Page 6: Django - the first five years
Page 7: Django - the first five years

Merry Slickmas

The Dog and Pony Show

Hark! The Local Musicians Sing!: New Christmas albums from Sam

Billen and Josh Atkinson

Sam Billen’s “Merry Christmas” and Josh Atkinson’s “Songs for Christmas” rank right up

there with recent yuletide blessings from Sufjan Stevens and Low. Both albums strip away

Best bets Upcoming

Today's events Search events

"A Benefit for Charley's Finger" 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

Staph blogs

O Caption! My Caption!

Loafers of Mass Destruction

13 comments

Scene Stealers

'Synecdoche, New York' tackles life’s

complexity with complexity

Events Latest Music Movies Food Nightlife

Page 8: Django - the first five years
Page 9: Django - the first five years
Page 10: Django - the first five years

“”

In the beginning there was Zope. Zope was a web application framework ... but

it had some discontents who dared to call it "monolithic" and "unpythonic".

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 Orrhttp://linuxgazette.net/113/orr.html

Page 11: Django - the first five years
Page 12: Django - the first five years
Page 13: Django - the first five years

2003

Page 14: Django - the first five years

2008

Page 15: Django - the first five years

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

Page 16: Django - the first five years
Page 17: Django - the first five years
Page 18: Django - the first five years

February 2004circa r1000

Page 19: Django - the first five years
Page 20: Django - the first five years

cms/apps/polls/poll.py

Page 21: Django - the first five years

>>>fromcms.apps.polls.pollsimportPoll>>>p=Poll(4,"hi",date(2004,1,1),...)>>>p.save()

Page 22: Django - the first five years

cms/apps/polls/polls.py

Page 23: Django - the first five years

cms/apps/polls/polls.py

Page 24: Django - the first five years

cms/apps/polls/dblayout.sql

Page 25: Django - the first five years

httpd.conf

Page 26: Django - the first five years

cms/conf/mrmustard/polls.py

Page 27: Django - the first five years

cms/views/polls/polls.py

Page 28: Django - the first five years

Data class Admin view

Data-access function(s) Admin template

Admin URLs

Page 29: Django - the first five years
Page 30: Django - the first five years

cms/datadescriptions/polls.py

Page 31: Django - the first five years

./generate_code.pypolls

Page 32: Django - the first five years

apps/polls.py

sql/polls.sql

views/admin/

polls.py

templates/admin/

polls/change_list.htmladd_form.htmlchange_form.html

Page 33: Django - the first five years

cms/utilities/codegeneration/generation.py

Page 34: Django - the first five years

cms/datadescriptions/polls.py

Page 35: Django - the first five years

DONOTEDITTHISFILEMANUALLY.ITWASGENERATEDBYAPROGRAM.RE‐RUNTHECODEGENERATORINSTEAD.

Page 36: Django - the first five years

Seven months later...October 2004

Page 37: Django - the first five years
Page 38: Django - the first five years

cms/models/polls.py

Page 39: Django - the first five years
Page 40: Django - the first five years

PyCon 2005

Page 41: Django - the first five years

Rails

Page 42: Django - the first five years
Page 43: Django - the first five years
Page 44: Django - the first five years
Page 45: Django - the first five years
Page 46: Django - the first five years
Page 47: Django - the first five years
Page 48: Django - the first five years
Page 49: Django - the first five years
Page 50: Django - the first five years
Page 51: Django - the first five years
Page 52: Django - the first five years
Page 53: Django - the first five years

classPoll(meta.Model):fields=(meta.SlugField('slug','slug',unique_for_month='pub_date'),meta.CharField('question','question',maxlength=255),meta.DateTimeField('pub_date','datepublished'),meta.DateTimeField('expire_date','expirationdate'),meta.ManyToManyField(core.Site),meta.PositiveSmallIntegerField('choice_votes','choicevotes'),)

db_table=pollsordering=('‐pub_date',)get_latest_by='pub_date'

Page 54: Django - the first five years

classPoll(meta.Model):slug=meta.SlugField(unique_for_month='pub_date')question=meta.CharField(maxlength=255)pub_date=meta.DateTimeField('datepublished')expire_date=meta.DateTimeField('expirationdate')sites=meta.ManyToManyField(core.Site)choice_votes=meta.PositiveSmallIntegerField(default=1)

classMETA:db_table='polls'ordering=('‐pub_date',)

Page 55: Django - the first five years

“”— Adrian, August 2005

http://www.djangoproject.com/weblog/2005/aug/25/modelsyntax/

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.

Page 56: Django - the first five years
Page 57: Django - the first five years
Page 58: Django - the first five years
Page 59: Django - the first five years
Page 60: Django - the first five years
Page 61: Django - the first five years
Page 62: Django - the first five years

Before:fromdjango.models.pollsimportPoll

After:frommyapp.modelsimportPoll

Page 63: Django - the first five years

Before:...magic!...

After:importdatetime

Page 64: Django - the first five years

Before:classPoll(meta.Model):classMETA:admin=meta.Admin(list_display=('title'),)

After:classPoll(meta.Model):classAdminlist_display=('title')

Page 65: Django - the first five years

Before:fromdjango.models.pollsimportpollspolls.get_list(slug__exact='slug')

After:frompolls.modelsimportPollPoll.objects.filter(slug='slug')

Page 66: Django - the first five years
Page 67: Django - the first five years

339fileschanged,22290insertions(+),15656deletions(‐)

Page 68: Django - the first five years

“”

After this merge, Django 1.0 can’t be far off.

— Bill de hÓrahttp://www.dehora.net/journal/2006/04/django_magic_merging.html

Page 69: Django - the first five years
Page 70: Django - the first five years

“0.95”

Page 71: Django - the first five years
Page 72: Django - the first five years

django.newforms

django.test

Page 73: Django - the first five years
Page 74: Django - the first five years
Page 75: Django - the first five years

18 months

Page 76: Django - the first five years

3,094 commits+ branches

Page 77: Django - the first five years

1,370 from the community

Page 78: Django - the first five years

230 new AUTHORS

Page 79: Django - the first five years

2,120 bugs fixed

Page 80: Django - the first five years

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

Page 81: Django - the first five years

40,000 lines of new documentation

Page 82: Django - the first five years

4 new full committers

Page 83: Django - the first five years

Unicode

Page 84: Django - the first five years

QSRF

Page 85: Django - the first five years

NFA

Page 86: Django - the first five years

GeoDjango

Page 87: Django - the first five years

ModelForms

Page 88: Django - the first five years

Autoescaping

Page 89: Django - the first five years

Django on Jython(Thanks, Google!)

Page 90: Django - the first five years

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

Page 91: Django - the first five years

API stability & forwards-compatability

http://docs.djangoproject.com/en/dev/misc/api-stability/

Page 92: Django - the first five years

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

Page 93: Django - the first five years

What’s next?

Page 94: Django - the first five years

Django 1.1March 16, 2009

Page 95: Django - the first five years

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

Page 96: Django - the first five years

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

Page 97: Django - the first five years

>>>Book.objects.aggregate(...Avg('price'),...highest_price=Max('price'))

{'price_avg':45.0,'highest_price':82.80}

Page 98: Django - the first five years

>>>Author.objects.aggregate(Sum('book__price'))

{'book_price_sum':442}

Page 99: Django - the first five years

>>>books=Book.objects.annotate(Max('authors__age'))

>>>books[0].nameu'PythonWebDevelopmentWithDjango'

>>>books[0].authors.all()[<Author:JeffreyForcier>,<Author:PaulBissex>,<Author:WesleyJ.Chun>]

>>>books[0].authors__age__max37.0

Page 100: Django - the first five years

Publisher.objects.annotate(num_books=Count('book__id'))\.filter(num_books__gt=1)\.order_by('num_books')

Page 101: Django - the first five years

Improved QuerySet.update()

Page 102: Django - the first five years

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

Page 103: Django - the first five years

Model Validationhttp://code.djangoproject.com/ticket/6845

Page 104: Django - the first five years

>>>p=Person.objects.get(...)>>>p.age=‐7>>>p.save(validate=True)Traceback(mostrecentcalllast):File"<stdin>",line1,in<module>ValidationError:enteranumbergreaterthan0.

Page 105: Django - the first five years

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

Page 106: Django - the first five years
Page 107: Django - the first five years

Class-based generic views

Page 108: Django - the first five years

fromdjango.views.genericimportDetailView

classPersonView(DetailView):queryset=Person.objects.all()defget_template(self,request):returnTemplate(...)

Page 109: Django - the first five years

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

... and more ...

Page 110: Django - the first five years

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


Recommended