Page not found error

12 views
Skip to first unread message

Charapalli Tharun NIQIJGURDN

unread,
Jan 15, 2021, 1:51:15 PM1/15/21
to Django users

I am a newbie to django and I have been stuck here from the past two days please help me


Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:

  1. polls/
  2. admin/

The empty path didn't match any of these.



Views.py

from django.shortcuts import render

from django.http import HttpResponse

def index(request):
return HttpResponse("Hello Chiku")



polls/urls.py

from django.urls import path

from polls import views

urlpatterns = [
path('', views.index, name='index'),
]


mysite/urls.py


from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('polls/', include("polls.urls")),
path('admin/', admin.site.urls),
]

Reply all
Reply to author
Forward
0 new messages