Hi,

On 8/22/11 4:23 PM, Lars Ruoff wrote:
> (hope i dont't need to wait another week for aproval of this post)
Nope, Google acted up and I did not get the confirmation mail for
whatever reason.

This particular problem I would solve with a filter:


def iter_with_previous(iterable):
    prev = None
    for item in iterable:
        yield prev, item
        prev = item

jinja_env.filters['iterwithprevious'] = iter_with_previous

And in the template:

{% for prev, current in iterable|iterwithprevious %}
    ...
{% endfor %}


Regards,
Armin

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en.

Reply via email to