Added is_international property to news
This commit is contained in:
parent
ca7d7f0fa8
commit
883b214d74
|
|
@ -221,6 +221,10 @@ class News(GalleryModelMixin, BaseAttributes, TranslatedFieldsMixin, HasTagsMixi
|
||||||
def is_publish(self):
|
def is_publish(self):
|
||||||
return self.state in self.PUBLISHED_STATES
|
return self.state in self.PUBLISHED_STATES
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_international(self):
|
||||||
|
return self.INTERNATIONAL_TAG_VALUE in map(lambda tag: tag.value, self.tags.all())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def web_url(self):
|
def web_url(self):
|
||||||
return reverse('web:news:rud', kwargs={'slug': self.slug})
|
return reverse('web:news:rud', kwargs={'slug': self.slug})
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,7 @@ class NewsBackOfficeDetailSerializer(NewsBackOfficeBaseSerializer,
|
||||||
'site_id',
|
'site_id',
|
||||||
'template',
|
'template',
|
||||||
'template_display',
|
'template_display',
|
||||||
|
'is_international',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user