1 from django.template import RequestContext
2 from django.shortcuts import render_to_response
3 from catalogue.models import Book
6 def main_page(request):
7 last_published = Book.objects.exclude(html_file='').order_by('-created_at')[:4]
9 return render_to_response("main_page.html", locals(),
10 context_instance=RequestContext(request))