You need to use the following url *http://localhost:8000/polls/* as you have mentioned that you want to go under the "polls/" django parses through the urls to find "/polls/" and if it does not exists it will surely give an error as you are requesting things that it does not have.
On Friday, March 30, 2018 at 12:21:03 AM UTC+5:30, Bryan Zimmer wrote: > > Hello all, > > I managed to get Django and mod_wsgi installed OK. I then followed through > with tutorial01, but even though I tried it twice, on two different > machines, I have come up blank. > > This is the output I am getting for the first cut of Tutorial 01. > > I am using Django 2.0.3 with python3.6 and mod_wsgi. 4.6.3: > > Page not found (404) > Request Method: GET > Request URL: http://localhost:8000/ > > Using the URLconf defined in pollapp.urls, Django tried these URL > patterns, in this order: > > 1. polls/ > 2. admin/ > > The empty path didn't match any of these. > > You're seeing this error because you have DEBUG = True in your Django > settings file. Change that to False, and Django will display a standard > 404 page. > > > Here is my pollap.urls: > > > ------------------------------------------------------------------------------------------------------------------ > > $ cat urls.py > > > """pollapp URL Configuration > > The `urlpatterns` list routes URLs to views. For more information please > see: > https://docs.djangoproject.com/en/2.0/topics/http/urls/ > Examples: > Function views > 1. Add an import: from my_app import views > 2. Add a URL to urlpatterns: path('', views.home, name='home') > Class-based views > 1. Add an import: from other_app.views import Home > 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') > Including another URLconf > 1. Import the include() function: from django.urls import include, path > 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) > """ > from django.contrib import admin > from django.urls import include, path > > urlpatterns = [ > path('polls/',include('polls.urls')), > path('admin/', admin.site.urls), > ] > > --------------------------------------------------------------------------------------------------------------- > The other relevant files, which I edited myself, following along with > Tutorial01 are included as attachments. > > > I have scoped and squinted, and it still looks to me as though I didn't > make any mistakes in editing the source code. > > If I missed something, I'll be embarrassed, but I think I followed the > instructions entirely the way they were written. > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d6f29157-6ca2-47cc-bef0-9f007f436bff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

