"mentions" property

2019-08-17
Marnanel Thurman 2019-07-09 11:04:55 +01:00
rodzic 08a1de4857
commit 6b62ee8057
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -32,3 +32,11 @@ class Item(thing.Thing):
@property
def text(self):
return self['content']
@property
def mentions(self):
from django_kepi.models.mention import Mention
logger.info('Finding Mentions for %s', self)
return [x.to_actor for x in
Mention.objects.filter(from_status=self)]