Activity stream representations for user and favorites

This commit is contained in:
Eliot Berriot 2018-02-25 14:44:00 +01:00
parent 93e4a4f123
commit 691665e3cf
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
12 changed files with 159 additions and 0 deletions

View file

@ -3,6 +3,7 @@ from __future__ import unicode_literals, absolute_import
import uuid
from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.urls import reverse
from django.db import models
@ -43,3 +44,6 @@ class User(AbstractUser):
def set_password(self, raw_password):
super().set_password(raw_password)
self.update_secret_key()
def get_activity_url(self):
return settings.FUNKWHALE_URL + '/@{}'.format(self.username)