Created
July 4, 2013 04:00
-
-
Save boourns/5924818 to your computer and use it in GitHub Desktop.
example of iterating over shop vendors
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
Example of iterating over list of vendors: | |
<ul> | |
{% for product_vendor in shop.vendors %} | |
<li class="{{ product_vendor }}">{{ product_vendor | link_to_vendor }}</li> | |
{% endfor %} | |
</ul> | |
Example of converting list to JSON: | |
{{ shop.vendors | json }} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment