Update content-pages

This commit is contained in:
Ruslan Stepanov 2020-01-24 11:59:13 +00:00
parent 34055d3669
commit a2f537a5ac

View File

@ -107,7 +107,10 @@ class ContentPageBaseView(generics.GenericAPIView):
return 'static'
def get_queryset(self):
return super().get_queryset().filter(news_type__name=self.static_page_category)
return News.objects.with_base_related() \
.order_by('-is_highlighted', '-publication_date', '-publication_time') \
.filter(news_type__name=self.static_page_category)
class ContentPageView(ContentPageBaseView, generics.ListAPIView):