It seems you can also say
{{item.list.0}} = {{item.list.1}}
--~--~-~--~~~---~--~~
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
First of all, do you need a template tag for this? Can't you say
{% for item in mylist %}
{{item|slice:"0"}} = {{item|slice:"1"}}
{% endfor %}
If you want to create a for-loop-like template tag, you need some
additional machinery. It's best to use class ForNode and def do_for()
from
2 matches
Mail list logo