working polls app with function-based non-generic views

This commit is contained in:
2025-12-21 18:54:55 -05:00
parent 384b2e7303
commit 72d10ab9d2
17 changed files with 194 additions and 55 deletions

15
apps/polls/urls.py Normal file
View File

@@ -0,0 +1,15 @@
from django.urls import path
from . import views
app_name = "polls"
urlpatterns = [
# ex: /polls/
path("", views.index, name="index"),
# ex: /polls/5/
path("specifics/<int:question_id>/", views.detail, name="detail"),
# ex: /polls/5/results/
path("<int:question_id>/results/", views.results, name="results"),
# ex: /polls/5/vote/
path("<int:question_id>/vote/", views.vote, name="vote"),
]