Created
December 17, 2017 13:44
-
-
Save solidpple/fc50784961b27dfd9945569a2513ed6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.http import HttpResponse | |
from .models import Question | |
def index(request): | |
latest_question_list = Question.objects.order_by('-pub_date')[:5] | |
output = ', '.join([q.question_text for q in latest_question_list]) | |
return HttpResponse(output) | |
# Leave the rest of the views (detail, results, vote) unchanged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment