From b52be5af8cd2c8e453ea5f5af2e48cc507c5fd04 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Tue, 17 May 2016 15:51:25 +0200 Subject: [PATCH] only show public products --- shop/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shop/views.py b/shop/views.py index b45bfcfb..abdf2366 100644 --- a/shop/views.py +++ b/shop/views.py @@ -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(