On Mon, 2009-02-23 at 17:12 -0800, djandrow wrote: > Also i have an archive list that is created from a db query that > appears on every page: > > archive_list = Entry.objects.dates('entry_date', 'month', > order='DESC') > > currently i have this in all of my views but that can't be very > efficient, wheres the best place to put that?
You could use a context processor (perhaps; not everything is possible as a context processor). Or you could use a template tag that is called in the base template and does the work of extracting the results from the database and rednering them (or inserting them into a variable in the context). The template tag approach often works out quite cleanly, I feel. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---