forked from 00dani/lemoncurry
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:
parent
0d520c0fd8
commit
747c053c89
1 changed files with 5 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue