On Wed, 2009-04-29 at 21:11 +0300, Oleg Oltar wrote:
[...]
> Is there a way to check in the loop if it's a first item. And if so to
> process it in a different way? Or do I have pass first article to
> template separately?

Inside a for-loop you have access to a the counter for the loop and
there are some handy booleans for when it's the first or last time
through the loop, too. Have a look at the documentation for the "for"
template tag:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to