On Tue, Jun 4, 2013, Andre Terra <andrete...@gmail.com> wrote:

>I'm mostly concerned with ambiguous behaviour for the clauses which include
>other operands. For example,

Looking at the various solutions that have been proposed, I am not at all sure 
that this is something that the template author should have to deal with at 
all. 

Most of the suggested avenues seem to make the template-writing more complex, 
and the templates more full of important decisions about whether they want 
their code to touch the database in expensive ways, which is surely asking more 
of the template design process than is appropriate.

Also, the {% with expensive.method as variable %} way of doing things already 
exists, and doesn't seem more complex than the suggested alternatives.

What about my earlier suggestion that this be dealt with in Python, not in 
templates - that the Python programmer decides, for a particular method (or 
class, because I guess a class could have an expensive __init__()) whether that 
thing should be re-evaluated more than once per request, or per context?

Daniele


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to