Add support for brand stockist searches.

This commit is contained in:
2013-04-08 22:44:03 +01:00
parent 3886f3d456
commit 36d8535d9e
8 changed files with 150 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
from django.views.generic import ListView
from ..models import Brand
class BrandListView(ListView):
model = Brand
paginate_by = 10
def get_queryset(self):
qs = super(BrandListView, self).get_queryset()
return qs.exclude(stores=None).prefetch_related('stores')