Update content-pages
This commit is contained in:
parent
34055d3669
commit
a2f537a5ac
|
|
@ -107,7 +107,10 @@ class ContentPageBaseView(generics.GenericAPIView):
|
||||||
return 'static'
|
return 'static'
|
||||||
|
|
||||||
def get_queryset(self):
|
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):
|
class ContentPageView(ContentPageBaseView, generics.ListAPIView):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user