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: 00dani
GPG Key ID: 5A5D2D1AFF12EEC5
1 changed files with 5 additions and 0 deletions

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,