BO news list by country
This commit is contained in:
parent
b25f387c9b
commit
e68142bf2e
|
|
@ -99,7 +99,10 @@ class NewsBackOfficeLCView(NewsBackOfficeMixinView,
|
|||
|
||||
def get_queryset(self):
|
||||
"""Override get_queryset method."""
|
||||
return super().get_queryset().with_extended_related()
|
||||
qs = super().get_queryset().with_extended_related()
|
||||
if self.request.country_code:
|
||||
qs = qs.by_country_code(self.request.country_code)
|
||||
return qs
|
||||
|
||||
|
||||
class NewsBackOfficeGalleryCreateDestroyView(NewsBackOfficeMixinView,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user