Hello, I currently follow the Django polls app tutorial. I've come to the step for adding paths to the urlpatterns:
python_site/urls.py:
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]
However, I receive this error message when opening the site:
Using the URLconf defined in python_site.urls, Django tried these URL patterns, in this order: polls/ admin/ The empty path didn't match any of these.
In polls/urls.py I have:
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
While "path" doesn't work, "url" does:
url(r'^$', views.index, name='index'),
url(r'^admin/', admin.site.urls),
I'm a complete beginner in python so I appreciate your understanding and help!