Compare commits
2 Commits
dfcf39539b
...
c717a8e25c
| Author | SHA1 | Date | |
|---|---|---|---|
| c717a8e25c | |||
| e4ebde5944 |
1
polls/templates/polls/detail.html
Normal file
1
polls/templates/polls/detail.html
Normal file
@ -0,0 +1 @@
|
||||
{{ question }}
|
||||
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user