On Tuesday 04 June 2013, Daniele Procida wrote: > > [...] the {% with expensive.method as variable %} way of doing things > already exists, [...] What about my earlier suggestion that this be dealt > with in Python, not in templates [...]
This thread, from its start, has mixed two separate (though related) issues. One of them is the performance cost of executing expensive computations more than once, which your arguments address (and IMO, you are right: invocations of nontrivial operations should be avoided in templates, and moved to Python code wherever possible). But I think that most suggestions focused more on the other issue: How to enable the only-do-pre-and-post-if-body-not-empty semantics with a succinct, clear syntax. Shai. -- 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.