I'm using Django templating with Google App Engine. I'm trying unsuccessfully to print out a menu.
The controller:
menu_items = {'menu_items': [{'href': '/', 'name': 'Home'},
{'href': '/cart', 'name': 'Cart'}],
}
render('Views/menu.html', self, {'menu_items': menu_items})
# ...
def render(filename, main, template_values):
path = os.path.join(os.path.dirname(__file__), filename)
main.response.out.write(template.render(path, template_values))
menu.html:
<ul>
{% for page in menu_items %}
<li><a href="{{page.href}}">{{page.name}}</a></li>
{% endfor %}
</ul>
The HTML produced:
<li><a href=""></a></li>
What am I doing wrong here?