change ordering in NewsList view

This commit is contained in:
Dmitriy Kuzmenko 2019-08-23 15:29:55 +03:00 committed by Anatoly
parent 1747525f0f
commit e2767af57d

View File

@ -27,7 +27,7 @@ class NewsList(NewsViewMixin, JWTListAPIView):
return News.objects.annotate_localized_fields(locale=self.request.locale)\ return News.objects.annotate_localized_fields(locale=self.request.locale)\
.published()\ .published()\
.by_country_code(code=self.request.country_code)\ .by_country_code(code=self.request.country_code)\
.order_by('-created') .order_by('-is_highlighted', '-created')
class NewsCreate(generics.CreateAPIView): class NewsCreate(generics.CreateAPIView):