adds polls landing page

This commit is contained in:
ergz 2022-07-23 15:28:56 -07:00
parent 0bbd13ce35
commit 7323d98358
8 changed files with 13 additions and 4 deletions

Binary file not shown.

View File

@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path("polls/", include("polls.urls"), name="polls_index"),
path('admin/', admin.site.urls)
]

Binary file not shown.

Binary file not shown.

Binary file not shown.

7
polls/urls.py Normal file
View File

@ -0,0 +1,7 @@
from django.urls import path
from . import views
urlpatterns = [
path("", views.index, name = "index")
]

View File

@ -1,3 +1,4 @@
from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index(request):
return HttpResponse("hello from within the poll index!")