Hello iain! Yesterday I faced the same problem with changing change_list_results.html, so I circumvented it adding custom javascript in admin/myapp/mymodel/change_list.html. The Javascript adds additional rows to the table with links using DOM.
Depending on the results you want to achieve, you can also use Javascript to modify the list view. Else you can try modify admin/change_list_results.html and add some checking like: {% ifequal opts.module_name "differently_listed_model" %} ... some custom listing ... {% else %} ... default listing ... {% endifequal %} Or similarly include different custom template tag instead of {% result_list cl %} in change_list.html As you see, the contributed administration is not flexible enough, but some creativity can solve many problems. Good luck! Aidas Bendoraitis [aka Archatas] On 11/1/06, iain duncan <[EMAIL PROTECTED]> wrote: > > 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. > > > > Looking in change_list.html I find this: > > {% block result_list %} > {% result_list cl %} > {% endblock %} > > I'm confused by the above, as I don't know how that middle tag is > working. It's not the same block inheritance as in the tutorial. Is > there a way to change how that tag is rendered on a per model basis? > > Looking forward to that book ... ;) > > 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 -~----------~----~----~----~------~----~------~--~---