On Tue, 2006-31-10 at 20:19 -0600, James Bennett wrote: > 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.
Aha, ok, so instead of actually changing what goes to the template I can route by model. Now, I am also however interested in hacking on the admin views/models themselves. Is there some way of replacing those much like one does for templates? Would I make an entire copy of the admin interface and link to my copy through the settings file? I would like to be able to send more info through template variables to my extended templates. Thanks for the tip! Iain --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---