Skip to content

Instantly share code, notes, and snippets.

@greggb
Created October 3, 2012 23:29
Show Gist options
  • Save greggb/3830554 to your computer and use it in GitHub Desktop.
Save greggb/3830554 to your computer and use it in GitHub Desktop.
Jinja Loop Over Subset
{% for item in all_items %}
{% if loop.index <= n %}
{{ item }}
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment