only show public products

This commit is contained in:
Thomas Steen Rasmussen 2016-05-17 15:51:25 +02:00
parent f5e05ac51c
commit b52be5af8c

View file

@ -91,7 +91,8 @@ class ShopIndexView(ListView):
if 'category' in self.request.GET:
category = self.request.GET.get('category')
context['products'] = context['products'].filter(
category__slug=category
category__slug=category,
public=True,
)
context['current_category'] = category
context['categories'] = ProductCategory.objects.annotate(