kopia lustrzana https://gitlab.com/marnanel/chapeau
Add fields to trilby's LocalPerson needed by bowler's PersonSerializer;
these are all *_url methods.trilby-heavy
rodzic
87c2f34447
commit
7f642ac325
|
@ -511,3 +511,28 @@ class LocalPerson(Person):
|
|||
)
|
||||
|
||||
return result
|
||||
|
||||
def inbox_url(self):
|
||||
return uri_to_url(settings.KEPI['USER_INBOX_LINK'] % {
|
||||
'username': self.local_user.username,
|
||||
})
|
||||
|
||||
def outbox_url(self):
|
||||
return uri_to_url(settings.KEPI['USER_OUTBOX_LINK'] % {
|
||||
'username': self.local_user.username,
|
||||
})
|
||||
|
||||
def featured_url(self):
|
||||
return uri_to_url(settings.KEPI['USER_FEATURED_LINK'] % {
|
||||
'username': self.local_user.username,
|
||||
})
|
||||
|
||||
def following_url(self):
|
||||
return uri_to_url(settings.KEPI['USER_FOLLOWING_LINK'] % {
|
||||
'username': self.local_user.username,
|
||||
})
|
||||
|
||||
def followers_url(self):
|
||||
return uri_to_url(settings.KEPI['USER_FOLLOWERS_LINK'] % {
|
||||
'username': self.local_user.username,
|
||||
})
|
||||
|
|
Ładowanie…
Reference in New Issue