/johnny/tests/testapp/views.py

https://bitbucket.org/jmoiron/johnny-cache/ · Python · 12 lines · 9 code · 1 blank · 2 comment · 0 complexity · b4860e02f3e356dd7dc91b65b9b5e9c5 MD5 · raw file

  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """Views for Johnny's testapp."""
  4. from django.shortcuts import render_to_response
  5. from models import *
  6. def template_queries(request):
  7. """Render a simple template that will perform a query."""
  8. books = Book.objects.all()
  9. return render_to_response('template_queries.html', locals())