Probably what you want is to make a custom template tag that does the proper query-to-html business, and then stick that tag in your base template. Might want to look into caching the result, if it doesn't change often...
http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-tags Eric On Jun 26, 2008, at 11:14 PM, moonsand wrote: > > I have a design issue where i want to have a standard base template > display a list of database entries with a count for the most popular > entries. If I am using this as the base template this means that I > need to pass the list and the calculated count from any view which > calls any template which extends the base template. I can't help but > think I am going about this the wrong way since I am repeating code > and procedure in the views section. Anyone know what I really ought to > be doing? > > Many thanks. > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---