Re: Help with a custom tag

2006-03-03 Thread akaihola

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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Help with a custom tag

2006-03-03 Thread akaihola

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 defaulttags.py as a model.


--~--~-~--~~~---~--~~
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 from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---