2. A bit about me
• Programmer @ 5Q Communications
• Hack on Django mostly full-time
• Dozen+ sites in production
• Calvin grad
3.
4. A bit about Django
• Named after Django Reinhart, jazz guitarist
• Python 2.3+ (Not 3.x yet, afiak)
• BSD license
• djangoproject.com
• Current release: 1.1
5.
6. Who uses it?
• NASA
• PBS
• NY Times
• LA Times
• National Geographic
• Discovery Channel
7. Features
• Object-Relational • i18n/unicode support
Mapper
• Cache framework
• MVC architecture
• Testing framework
• Templating Language
• Great docs (650+ pages)
• “Automatic” admins
• Friendly community
• Elegant urls
8. More Features
• Jython support • Built-in RSS/ATOM
• Geospacial content • Built-in site maps
(via GeoDjango)
• Send emails easily
• Built-in dev server
• “Signal” hooks
• Nice support
• Solid security emphasis
for forms
9. Projects and Apps
Settings: database, App Live anywhere in your
email, caching, etc. Project PYTHONPATH
App
HTML, CSS, App
images, etc. Templates
& Assets App
22. staff_member.html
{% for group in groups %}
<h2>{{group.name}}</h2>
<ul>
{% for member in group.staffmember_set.all %}
<li>
<h3>{{member.first_name}} {{member.last_name}}</h3>
<p>{{member.bio}}</p>
</li>
{% endfor %}
</ul>
{% endfor %}
23. staff_member.html
{% extends ‘base_site.html’ %}
{% block content %}
{% for group in groups %}
<h2>{{group.name}}</h2>
<ul>
{% for member in group.staffmember_set.all %}
<li>
<h3>{{member.first_name}} {{member.last_name}}</h3>
<p>{{member.bio}}</p>
</li>
{% endfor %}
</ul>
{% endfor %}
{% endblock content %}
27. Some Warts
• No support for • REST/SOAP
multiple databases support lacking
• Poor environment • “Explicit” but still tightly
support (think rails) coupled for some things
• Template logic tags • No integrated
below average deployment toolchain
• No built-in migrations • CMS extras lacking
(wysiwyg, file browser...)
• Too big?
28. Rest of the stack
• Databases • Deployment
• SQLite • mod_python
• MySQL • mod_wsgi
• Postgresql • fast cgi
• Oracle
29. Tips
• virtualenv is your friend
• default settings.py is about 50% of what a
production site ends up requiring
• local_settings.py
• Don’t be afraid of lots of apps
• ‘South’ is a solid migrations tool