mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-22 14:19:23 +00:00
Split out online and retail store sections.
This commit is contained in:
@@ -27,6 +27,21 @@ class StoreListView(HaystackSearchListMixin, ListView):
|
||||
return qs.filter(active=True).select_related('address', 'address__country')
|
||||
|
||||
|
||||
class OnlineStoreListView(StoreListView):
|
||||
template_name_suffix = '_online_list'
|
||||
|
||||
def get_queryset(self):
|
||||
qs = super(OnlineStoreListView, self).get_queryset()
|
||||
return qs.filter(store_type__in=[Store.STORE_TYPE_ONLINE, Store.STORE_TYPE_BOTH])
|
||||
|
||||
|
||||
class RetailStoreListView(StoreListView):
|
||||
|
||||
def get_queryset(self):
|
||||
qs = super(RetailStoreListView, self).get_queryset()
|
||||
return qs.filter(store_type__in=[Store.STORE_TYPE_ONLINE, Store.STORE_TYPE_BOTH])
|
||||
|
||||
|
||||
class StoreDetailView(EditorCheckMixin, DetailView):
|
||||
model = Store
|
||||
|
||||
|
||||
Reference in New Issue
Block a user