Compare commits

...

2 Commits

Author SHA1 Message Date
c717a8e25c shortened 404 try/catch on detail 2025-11-22 20:43:28 -06:00
e4ebde5944 added html for detail 2025-11-22 20:42:43 -06:00
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1 @@
{{ question }}

View File

@ -1,4 +1,4 @@
from django.shortcuts import render
from django.shortcuts import get_object_or_404, render
from django.http import HttpResponse
from django.template import loader
@ -14,7 +14,8 @@ def index(request):
def detail(request, question_id):
return HttpResponse("You're looking at question %s." % question_id)
question = get_object_or_404(Question, pk=question_id)
return render(request, "polls/detail.html", {"question": question})
def results(request, question_id):