mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-22 14:19:23 +00:00
12 lines
291 B
Python
12 lines
291 B
Python
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')
|