hi, I’m a beginner, so excuse me.
I followed a tutorial
who made me set up the file urls.py
from django.contrib import admin
from django.urls import path
from rolls import views
urlpatterns = [
path(‘admin/’, admin.site.urls),
path(‘rolls/’, views.rolls,)
]
and the file views.py
def rolls (request):
return render(request,‘rolls/rolls.html’,)
as soon as I added this line
path(‘rolls/’, views.rolls,)
the site did not work anymore and gives me this error
Page not found (404)
Request Method: | GET |
---|---|
Request URL: | http://127.0.0.1:8000/ |
Using the URLconf defined in ciao.urls
, Django tried these URL patterns, in this order:
- admin/
- rolls/
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.
Does anyone know where the mistake is?
thanks