André, On Sat, 19 Apr 2008, apm wrote:
> so i figured out the following (in admin/change_list.html): > > {% ifequal cl.opts.verbose_name "poll" %} > <form action="import_polls" method="post"> > Import from file <input name="filename" type="text"> > <input > value="import" type="submit"> > </form> > {% endifequal %} > > is this the way to go or are there better options? Are you using newforms-admin or the admin that's comes with the trunk/latest release? Would that admin be called oldforms-admin? :-) Anyway, if you're using "old" admin, checkout the "Extending Django's Admin Interface" chapter in the Django Book: http://www.DjangoBook.com/en/1.0/chapter17/ If you're using newforms-admin, there's a nice HowTo on the Django wiki: http://code.djangoproject.com/wiki/NewformsHOWTO Whichever you're using it's better to copy the admin template you want to customize to your project's template directory and customize the copy. Looking at the above resources it looks like one would use the same directory scheme for either admin: path/to/project/<TEMPLATE_DIR>/admin/<APP>/<MODEL>/change_list.html using your template snippet from above, and the tutorial polls app, as an example if your project were to be located at /home/Andre/Django/mysite and you had a template directory named templates in your mysite directory, you would copy the change_list.html template from the admin app to: /home/Andre/Django/mysite/templates/admin/polls/poll/change_list.html and customize that copy. And, using this approach you can leave out the ifequal block since the customized template will only be used for the polls/poll app/model. P.S. I'm just starting to explore admin customization myself, so hopefully more experienced Django user(s) will jump in and clarify anything I might have smegged up. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et efficax per exempla!!! --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---