diff --git a/diventi/products/context.py b/diventi/products/context.py index 078a6585..b7b63a28 100644 --- a/diventi/products/context.py +++ b/diventi/products/context.py @@ -22,6 +22,6 @@ def project_categories(request): def pinned_projects(request): context = {} - pinned_projects = (Product.objects.hot() | Product.objects.pinned_list()).distinct() - context['pinned_projects'] = pinned_projects + context['pinned_products_nav'] = Product.objects.pinned_list().distinct() + context['hot_product_nav'] = Product.objects.hot().get() return context \ No newline at end of file diff --git a/diventi/products/models.py b/diventi/products/models.py index 11fe7e07..9e8c08f9 100644 --- a/diventi/products/models.py +++ b/diventi/products/models.py @@ -88,7 +88,7 @@ def pinned(self): # Return the list of pinned products def pinned_list(self): - products = self.published().filter(pinned=True).prefetch() + products = self.published().filter(pinned=True).not_hot().prefetch() return products # Get the list of published products of a certain category diff --git a/diventi/templates/base_quick.html b/diventi/templates/base_quick.html index 569e7ead..78757d45 100644 --- a/diventi/templates/base_quick.html +++ b/diventi/templates/base_quick.html @@ -313,21 +313,21 @@