My Custom tag:
# app/templatetags/ctags.py
def getgenre():
genre = ["Test1", "Test2"]
return genre
register.simple_tag(getgenre)
My html:
# app/templates/base.html
{% load ctags %}
<!-- {% getgenre %} -->
{% for genre in getgenre %}
<li>{{genre}}</li>
{% endfor %}
This renders a blank page for me. If I uncomment {% getgenre %}, django renders ["Test1", "Test2"] as expected. I've tried countless variations of setting up my tag (including the non-simple_tag way) to no avail. I am simply unable to iterate over any value returned by one of my custom-tags.
Am I missing something fundamental here?