this repo has no description

Change URLConf to enable us to use generic Django views

+3 -3
+3 -3
polls/urls.py
··· 5 5 app_name = "polls" 6 6 urlpatterns = [ 7 7 # ex: /polls/ 8 - path("", views.index, name="index"), 8 + path("", views.IndexView.as_view(), name="index"), 9 9 # ex: /polls/5/ 10 - path("<int:question_id>/", views.detail, name="detail"), 10 + path("<int:pk>/", views.DetailView.as_view(), name="detail"), 11 11 # ex: /polls/5/results/ 12 - path("<int:question_id>/results/", views.results, name="results"), 12 + path("<int:pk>/results/", views.ResultsView.as_view(), name="results"), 13 13 # ex: /polls/5/vote/ 14 14 path("<int:question_id>/vote/", views.vote, name="vote") 15 15 ]