from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), ]
And then updated urls.py at ".\mysite\mysite\"(".\mysite\mysite\urls.py"), without the documentation:from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^polls/', include('polls.urls')), url(r'^admin/', admin.site.urls), ]
| Request Method: | GET |
|---|---|
| Request URL: | http://127.0.0.1:8000/ |
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
The current URL, , 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.