Skip to content

Instantly share code, notes, and snippets.

@piyonishi
Last active December 18, 2015 02:39
Show Gist options
  • Save piyonishi/5712480 to your computer and use it in GitHub Desktop.
Save piyonishi/5712480 to your computer and use it in GitHub Desktop.
# jinjaでenumerate()
<ul>
{%- for item in items %}
# loop.indexだと1から始まる
<li>{{ item }} - {{ loop.index0 }}</li>
{%- endfor %}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment