I am new to python and django. I want to know how I can display a python list in a django template. A list is a list of days in weeks, for example: day_list = ['sunday', 'monday', 'tuesday']
Pass it into the template as context, and then just iterate over it.
{% for day in day_list %} {{ day }} {% endfor %}
This is the documentation for the for tag . I recommend you go through the Django tutorial , and in part 3 they iterate over material on your templates, including iterating over sequences of things (like lists).
You need to pass it in the context of the template.
render_to_response(..., {"day_list": ['sunday','monday','tuesday']} )