Estou começando a aprender django(ou tentando) mas não consigo resolver o seguinte problema:
"Using the URLconf defined in SiteJG.urls, Django tried these URL patterns, in this order:
Templates/main.html
The empty path didn't match any of these."
settings.py:
ROOT_URLCONF = 'SiteJG.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['templates/'],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
urls.py:
from django.urls import path
from django.views.generic import TemplateView
urlpatterns = [
path('templates/', TemplateView.as_view(template_name='main.html'))
]