Я пытаюсь создать сайт электронной коммерции, но я могу продолжить работу из-за ошибки, показанной выше. Спасибо
файл url.py
from django.urls import path
from .**views import ItemDetailView, HomeView, checkout
app_name = 'core'
urlpatterns =[
path('', HomeView.as_view(), name='homepage'),
path('checkout/', checkout, name='checkout'),
path('product/<slug>/', ItemDetailView.as_view(), name='product')
файл views.py
from django.shortcuts import render
from .models import Item
from django.views.generic import ListView, DetailView
class HomeView(ListView):
model = Item
template_name = "home-page.html"
class ItemDetailView(DetailView):
model = Item
template_name = "product-page.html"
def checkout(request):
return render(request, 'checkout-page.html')
html шаблон
<a class="nav-link waves-effect" href="{% url 'core:product' %}" target="_blank">Products</a>