revision collection view

This commit is contained in:
Anatoly 2019-12-17 17:17:39 +03:00
parent 8a7b583154
commit 5032906483

View File

@ -17,8 +17,8 @@ class CollectionViewMixin(generics.GenericAPIView):
def get_queryset(self):
"""Override get_queryset method."""
return models.Collection.objects.published() \
.by_country_code(code=self.request.country_code) \
.order_by('-on_top', '-modified')
.by_country_code(code=self.request.country_code) \
.order_by('-on_top', '-created')
class GuideViewMixin(generics.GenericAPIView):
@ -39,7 +39,7 @@ class CollectionHomePageView(CollectionListView):
def get_queryset(self):
"""Override get_queryset."""
return super(CollectionHomePageView, self).get_queryset() \
.filter_all_related_gt(3)
.filter_all_related_gt(3)
class CollectionDetailView(CollectionViewMixin, generics.RetrieveAPIView):