Anonymous user
Boston Python Workshop/Saturday/Web app project: Difference between revisions
Boston Python Workshop/Saturday/Web app project (view source)
Revision as of 12:32, 5 March 2011
, 13 years ago→Write views that actually do something
imported>Paulproteus |
imported>Paulproteus |
||
Line 489:
All Django wants is that HttpResponse. Or an exception.
from polls.models import Poll
from django.http import HttpResponse
def index(request):
latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
|