Give Users a url property

This commit is contained in:
Danielle McLean 2017-10-25 12:07:57 +11:00
parent 950459cd5f
commit d267df337f
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -22,6 +22,9 @@ class Site(models.Model):
class User(ModelMeta, AbstractUser):
avatar = models.ImageField(upload_to=avatar_path)
note = models.TextField(blank=True)
# This is gonna need to change if I ever decide to add multiple-user support ;)
url = '/'
@property
def avatar_url(self):