Default to the author's avatar when picking the image for an entry, we will support u-photo later on but we don't just yet

This commit is contained in:
Danielle McLean 2017-10-25 14:06:12 +11:00
parent 0d520c0fd8
commit 747c053c89
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -27,6 +27,7 @@ class Entry(ModelMeta, models.Model):
_metadata = {
'description': 'content',
'image': 'image_url',
'twitter_creator': 'twitter_creator',
'og_profile_id': 'og_profile_id',
}
@ -39,6 +40,10 @@ class Entry(ModelMeta, models.Model):
def og_profile_id(self):
return self.author.facebook_id
@property
def image_url(self):
return self.author.avatar_url
def __str__(self):
return '{kind} {id}: {content}'.format(
kind=self.kind,