from django.template import Context, loader from django.http import HttpResponse from chris.travel.models import Travel, Country def index(request): travel_list = Travel.objects.all().order_by('-travel_date') country_list = Country.objects.all() t = loader.get_template('travel/index.html') c = Context({ 'travel_list': travel_list, 'country_list': country_list, }) return HttpResponse(t.render(c))