Professional Documents
Culture Documents
Sucks
A n d h o w w e c a n f i x i t
My Qualifications
Started using Django in 2006
Co-host of DjangoDose
Settings
Exclusionary establishment
Bad batteries
Apps
It’s a mess
My typical app
discovery lifecycle
“I need to let users upload avatars.”
:(
Fork
The model problem
Wrong solution
Generic Foreign
Keys
Good for flexibility
191
188.25
185.5
182.75
180
1.0 1.1 1.2
Performance
Requests/Second
80
60
40
20
0
1.0 1.1 1.2
In Effect
Kill contrib
Move to a DVCS
Must apps suck?
class Message(models.Model):
from_user = models.ForeignKey(User)
to_user = models.ForeignKey(User)
msg = models.CharField(max_length=128)
Idea: Use models,
don’t expose them
class Message(object):
Page.create_content_type(RichTextContent)
Page.register_templates(...)
Page.register_extensions('navigation', 'titles')
Late Binding FKs
In models.py:
class Favorite(models.Model):
item = LazyForeignKey(‘fave’)
user = ForeignKey(User)
date = DateTimeField(default=utcnow)
In settings.py:
http://mail.python.org/pipermail/python-dev/
2010-July/102306.html
Add more Core Devs
We have releases now, vast majority of people don’t run
off of trunk.
Trunk can break sometimes and it’s not the end of the
world.
Frankly, marketing.
Throw Tomatoes Now
Questions?
Comments?