On 10/31/06, iain duncan <[EMAIL PROTECTED]> wrote:
> 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.

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to