State Of Django
-
Upload
jacob-kaplan-moss -
Category
Technology
-
view
2.263 -
download
0
description
Transcript of State Of Django
The State of Django
Jacob Kaplan-Moss
PyCon, March 27, 2009http://jacobian.org/speaking/2009/state-of-django/
Happy five years!
Since PyCon 2008...
7,000
14,000
QSRFNFA
Merged
“Dude, we should totally have a big Django
meetup some time!”
! !
Developing reusable apps
James Bennett
PyCon Chicago, March 15, 2008
Django 0.96Over one year old
1.0
Unicodehttp://docs.djangoproject.com/en/dev/ref/unicode/
Getting help
Having trouble? We’d like to
help!
Try the FAQ – it’s got
answers to many common
questions.
Looking for specific
information? Try the Index,
Module Index or the detailed
table of contents.
Search for information in the
archives of the django-users
mailing list, or post a
question.
Ask a question in the
#django IRC channel, or
search the IRC logs to see if
its been asked before.
Django documentation
Everything you need to know about Django (and thensome).
First steps
OverviewSee what writing a database-driven
application with Django looks like.
InstallationGet Django installed on your computer.
Tutorial: Writing your firstDjango application
Part 1Start a project, create models and play
with the database API.
Part 2Explore the automatically-generated
admin site.
Part 3
Search
Search
Latest 1.0 0.96
All
Browse
Table of contents
General Index
Global Module Index
You are here:
Django v1.0 documentation
Django documentation
Last update:
September 12, 2008, noon (CDT)
Home Download Documentation Weblog Community Code
docs.djangoproject.com
48 languages
Signals
0.96
1.0
QSRF
Oracle
Pluggable file storagehttp://docs.djangoproject.com/env/dev/howto/custom-file-storage/
newforms
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/
ModelForms
Formsetshttp://docs.djangoproject.com/en/dev/forms/formsets/
Session backendshttp://docs.djangoproject.com/en/dev/topics/http/sessions/
File uploads: less FAIL
autoescape
Databrowsehttp://docs.djangoproject.com/en/dev/ref/contrib/databrowse/
Databrowse
Reporters
Articles
John Doe, Jane Smith, Eric Jones, More !
Dog bites man, Man bites dog, More !
Databrowse
Home / Reporters / Jane Smith
Reporter: Jane Smith
ID 2
Name Jane Smith
Email [email protected]
Appears in "reporter" in the following articles:
Dog bites man
GeoDjango
A world-class geographic web framework
django wiki mercurial docs presentations vmware (user: geo, pass: where2.0)
newforms-admin
JythonPyPy
IronPython*
et cetera
Django 1.1 betanow available
What’s new in 1.1?http://docs.djangoproject.com/en/dev/releases/1.1-alpha-1/
http://docs.djangoproject.com/en/dev/releases/1.1-beta-1/
ORM aggregationhttp://docs.djangoproject.com/en/dev/topics/db/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].nameu'Python Web Development With Django'
>>> books[0].authors.all()[<Author: Jeffrey Forcier >, <Author: Paul Bissex>, <Author: Wesley J. Chun>]
>>> books[0].authors__age__max37.0
Publisher.objects.annotate(num_books=Count('book__id')) \ .filter(num_books__gt=1) \ .order_by('num_books')
http://docs.djangoproject.com/en/dev/topics/db/queries/#query-expressions
Query Expressions
>>> Poll.objects.update(votes = F('votes') + 1)
Test faster
Unmanaged models
class Person(models.Model): ...
class Meta: managed = False
Proxy models
from django.contrib.auth import User
class EmotionalUser(User): class Meta: proxy = True
def is_angry(self): return self.username == 'hulk'
Deferred fields
>>> Story.objects.filter(...).defer('body')
Conditional View Processinghttp://docs.djangoproject.com/en/dev/topics/conditional-view-processing
def latest_entry(request): return Entry.objects.aggregate(Max('published'))
@last_modified(latest_entry)def front_page(request): ...
Admin
What’s next?
Django 1.1April 20ish
Please help!
GSoC
EuroDjangoCon
US DjangoCon ’09
1.2
Py3k