Hello i am trying to add a basic url called localhost:8000/shop
so that when i am on my homepage, I can click a link called shop and It will lead me to localhost:8000/shop
in my urls.py i added
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from homepage import views
urlpatterns = [
path('' , views.home),
path('admin/', admin.site.urls),
path('reviews/' , include('reviews.urls')),
path('shop/' , include('product.urls')),
]
in my folder called product i have a urls.py file with
from django.urls import include, path
from . import views
urlpatterns = [
path('shop/' , views.shop),
]
and in my product folder i have a views.py file with
from django.shortcuts import render
# Create your views here.
def shop(request):
return render(request, 'product/shop.html')
linking It to my html file inside my product folder.. when i run the server, I get this error message
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/shop
Using the URLconf defined in yorleico.urls, Django tried these URL patterns, in this order:
admin/
reviews/
shop/
The current path, shop, didn't match any of these.
What am i doing wrong?!