Django Cheatsheet

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

AJAX Integration

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

Example Apps / Tutorials

Getting Things Done

Others

Not exactly Django

(but still Python)


CategoryNotebook

DjangoCheatsheet (last edited 2007-03-15 11:55:41 by NathanYergler)