product search only for active products
This commit is contained in:
@@ -169,7 +169,7 @@ def product_search(request):
|
|||||||
|
|
||||||
if q == '':
|
if q == '':
|
||||||
# filter entire queryset
|
# filter entire queryset
|
||||||
products_qs = Product.objects.all()
|
products_qs = Product.objects.filter(active=True)
|
||||||
if tags:
|
if tags:
|
||||||
products_qs = Product.objects.filter(tags=tags)
|
products_qs = Product.objects.filter(tags=tags)
|
||||||
if category:
|
if category:
|
||||||
|
|||||||
Reference in New Issue
Block a user