<ul>
{% for choice in choices %}
<li> {{ choice }} </li>
{% endfor %}
</ul>
But if there are many places in which you need to use inclusion_tag , it
gets annoying that you have to
extract all these *short and simple* snippets into separate template files.
If simple_tag can also
set context, that will be more convenient. Something like:
@register.simple_tag(sets_context=True)
Just some thoughts. any comments are welcome.
Seems reasonable to me. If you make a ticket for this and assign it to
me (mtredinnick in Trac), I'll handle this.
Cheers,
Malcolm
# return a string , as before
@register.simple_tag
def func(...):
...
return 'a string'
# return a dict, items of the dict will be set to context
@register.simple_tag
def func(...):
...
return {'key' : value, ... }