Django template call function
Posted
by cleg
on Stack Overflow
See other posts from Stack Overflow
or by cleg
Published on 2010-03-18T09:53:37Z
Indexed on
2010/03/18
10:01 UTC
Read the original article
Hit count: 389
I'm passing to Django's template a function, which returns me some records. I want to call this function and iterate over it's result.
{% for item in my_func(10) %}
That doesn't work. I've tried to set fuction's return value to a variable and iterate over variable, but there seems to be no way to set variable in Django template.
Is there any normal way to do it?
© Stack Overflow or respective owner