I'm talking completely about the related objects accessors, and not
sending models to the templates is not a good solution for us :)

I want to setup some kind of blocking mechanism so that while rendering
a template the models will not do any SQL queries that have not already
been executed, or at least block the related field queries.

On Jan 9, 6:21 am, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
On 1/8/07 4:53 PM, Adrian Holovaty wrote:

> Templates don't have the "ability to execute SQL" -- it just happens
> that the Django database API executes SQL via attribute access in some
> cases (e.g., in the case of related objects via a foreign key) and I
> assume you're using that attribute access in the template. The
> template system itself knows nothing about SQL.To piggy-back on here:

It's incredibly simple to prevent the templates from being able to "execute
SQL": just don't pass model objects into the template.

Done, and done!

Jacob


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to