0
I’m starting to learn Jango(or trying) but I can’t solve the following problem:
"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."
py Settings.:
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',
],
},
},
]
py.:
from django.urls import path
from django.views.generic import TemplateView
urlpatterns = [
path('templates/', TemplateView.as_view(template_name='main.html'))
]