fix: extracted all web related stuff to a new app

This commit is contained in:
2024-11-23 20:46:14 +01:00
parent 66e24e48b2
commit 9608e283dd
24 changed files with 108 additions and 38 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ from shop.models import Product
class IndexView(TemplateView):
template_name = "shop/index.html"
template_name = "web/index.html"
def get_context_data(self, **kwargs):
return {
@@ -16,7 +16,7 @@ class IndexView(TemplateView):
class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin):
template_name = "shop/list_products.html"
template_name = "web/list_products.html"
queryset = Product.objects.all()
filter_class = ProductFilter
@@ -30,7 +30,7 @@ class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin):
class ProductDetail(TemplateView):
template_name = "shop/product_detail.html"
template_name = "web/product_detail.html"
def get_context_data(self, pk, slug, **kwargs):
product = get_object_or_404(Product, pk=pk)