diff --git a/polls/__pycache__/urls.cpython-310.pyc b/polls/__pycache__/urls.cpython-310.pyc index 35e5404..5614b4b 100644 Binary files a/polls/__pycache__/urls.cpython-310.pyc and b/polls/__pycache__/urls.cpython-310.pyc differ diff --git a/polls/__pycache__/views.cpython-310.pyc b/polls/__pycache__/views.cpython-310.pyc index ec96669..2687fcf 100644 Binary files a/polls/__pycache__/views.cpython-310.pyc and b/polls/__pycache__/views.cpython-310.pyc differ diff --git a/polls/urls.py b/polls/urls.py index 0399e3f..7271bc0 100644 --- a/polls/urls.py +++ b/polls/urls.py @@ -3,5 +3,8 @@ from django.urls import path from . import views urlpatterns = [ - path("", views.index, name = "index") + path("", views.index, name = "index"), + path("", views.detail, name="detail"), + path("/results/", views.results, name="results"), + path("/vote/", views.vote, name="vote") ] \ No newline at end of file diff --git a/polls/views.py b/polls/views.py index 06f3242..5620388 100644 --- a/polls/views.py +++ b/polls/views.py @@ -1,4 +1,15 @@ from django.http import HttpResponse def index(request): - return HttpResponse("hello from within the poll index!") \ No newline at end of file + return HttpResponse("hello from within the poll index!") + +def detail(request, question_id): + return HttpResponse("you are looking at question %s." % question_id) + +def results(request, question_id): + response = "you are looking at results for question %s" + return HttpResponse(response % question_id) + +def vote(request, question_id): + return HttpResponse("you are voting on question %s" % question_id) + \ No newline at end of file