Contents
A list of links and tips that I want to remember about Django. A list which looks suspiciously like an index of b-list.org.
Currently Really Interesting
Accessing Settings
from django.conf import settings
print settings.VALUE_IN_SETTINGS_PY
User Model & Authentication
http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model
user.get_profile() will return the linked profile object
AJAX Integration
http://www.b-list.org/weblog/2006/07/31/django-tips-simple-ajax-example-part-1
http://www.b-list.org/weblog/2006/08/05/django-tips-simple-ajax-example-part-2
Quicklinks into the Official Documentation
Admin Customization
> I would like to change the template ( or change behaviour ) for the > change list view, but only for one model. Can anyone tell me how one > could find out in the template which model we are representing? Or > alternately, where in the admin code one might add extra variables to > render to the template?
When Django renders the list, it looks for the following templates, in order, and uses the first one it finds:
admin/appname/modelname/change_list.html admin/appname/change_list.html admin/change_list.html
Where 'appname' and 'modelname' are the names of the application and the model, respectively. To override for a specific application, make a directory with the name of that application, and put a 'change_list.html' template in it. To override for a specific model, make the 'appname' directory, make a 'modelname' directory and put the 'change_list.html' template inside it.
Other Bits
Custom managers, manipulators, etc (for auto-populated fields... which we'll want for created_by)
Reverse URL Lookup (patch I'll probably need for the deployment story)
Django filebrowser (upload, browse, from admin)
Django Collection (generic, restful collection app)
Example Apps / Tutorials
Getting Things Done
Others
Mnemosyne wiki
Falling Bullets Blog w/ tutorials on a simple "Word Press clone"
Not exactly Django
(but still Python)
Pocoo Python-based forum system
MercuryTide white papers (many Django-related)