only show public products
This commit is contained in:
parent
f5e05ac51c
commit
b52be5af8c
|
@ -91,7 +91,8 @@ class ShopIndexView(ListView):
|
||||||
if 'category' in self.request.GET:
|
if 'category' in self.request.GET:
|
||||||
category = self.request.GET.get('category')
|
category = self.request.GET.get('category')
|
||||||
context['products'] = context['products'].filter(
|
context['products'] = context['products'].filter(
|
||||||
category__slug=category
|
category__slug=category,
|
||||||
|
public=True,
|
||||||
)
|
)
|
||||||
context['current_category'] = category
|
context['current_category'] = category
|
||||||
context['categories'] = ProductCategory.objects.annotate(
|
context['categories'] = ProductCategory.objects.annotate(
|
||||||
|
|
Loading…
Reference in a new issue