from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from .models import Expense, CATS def detail(request): context = { 'object_list': Expense.objects.all(), 'categories': CATS } return render_to_response('details/expenses.html', context, context_instance=RequestContext(request))