feat: moved users views to web app

This commit is contained in:
2024-11-30 13:22:09 +01:00
parent 500886aacd
commit e40cdee31b
14 changed files with 121 additions and 128 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
from django.shortcuts import render
from django.views.generic import TemplateView
from shop.filters import ProductFilter
from shop.models import Product, Cart
from shop.models import Product, Cart, ProductPrice
from web.mixins import FilteredQuerysetMixin, PaginatedQuerysetMixin
from web.settings import ANONYMOUS_CART_ID_COOKIE_NAME
from web.utils import get_or_create_cart
@@ -9,7 +9,7 @@ from web.utils import get_or_create_cart
class ListProducts(TemplateView, FilteredQuerysetMixin, PaginatedQuerysetMixin):
template_name = "web/list_products.html"
queryset = Product.objects.all()
queryset = Product.objects.all().prefetch_related('images', )
filter_class = ProductFilter
def get_context_data(self, **kwargs):