feat: moved users views to web app
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user