Created
April 16, 2014 09:29
-
-
Save seanislegend/10840829 to your computer and use it in GitHub Desktop.
Create a list to use in a for-loop in Django templates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% with 'one two three four five six' as list %} | |
{% for item in list.split %} | |
{{ item }}<br> | |
{% endfor %} | |
{% endwith %} |
Nazkter, I don't think that even parses.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any difference in performance if I use this?: