from django.shortcuts import render_to_response def my_view(request): mylist = ['item 1', 'item 2', 'item 3'] return render_to_response('template.html', {'mylist':mylist})
Then you can access and list in a template like this (among other methods):
{% for i in mylist %} {{ i }}, {% endfor %}
source share