should_read same country
This commit is contained in:
parent
36c4641ed0
commit
c82362b268
|
|
@ -136,6 +136,7 @@ class NewsQuerySet(TranslationQuerysetMixin):
|
||||||
def should_read(self, news, user):
|
def should_read(self, news, user):
|
||||||
return self.model.objects.exclude(pk=news.pk).published(). \
|
return self.model.objects.exclude(pk=news.pk).published(). \
|
||||||
annotate_in_favorites(user). \
|
annotate_in_favorites(user). \
|
||||||
|
filter(country=news.country). \
|
||||||
with_base_related().by_type(news.news_type).distinct().order_by('?')
|
with_base_related().by_type(news.news_type).distinct().order_by('?')
|
||||||
|
|
||||||
def same_theme(self, news, user):
|
def same_theme(self, news, user):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user