On Jul 30, 2:25 pm, perrin <phark...@gmail.com> wrote: > Hi, > > I'd like to determine what data a template uses, in order to optimize > my database access for some large queries. The idea is to fetch as > much as possible in a single query up front. Is there any API for > looking at the tags used in a template? If not, I was thinking of > passing in a custom Context subclass that captures the requests for > data. Does that sound reasonable? > > - Perrin
You probably want to look at the django-debug-toolbar, which (among other things) shows you all the SQL commands used to build a page. I've used a similar in-house tool to massively reduce the load on our database servers for some very complex pages. -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---