Commit 290a294d28b9e2bc86fdec941e83849ab4218e31
1 parent
53d978f7
Exists in
master
and in
3 other branches
Adding method to user model
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
users/models.py
... | ... | @@ -38,6 +38,9 @@ class User(AbstractBaseUser, PermissionsMixin): |
38 | 38 | def __str__(self): |
39 | 39 | return self.social_name or self.username |
40 | 40 | |
41 | + def get_short_name(self): | |
42 | + return self.username | |
43 | + | |
41 | 44 | @property |
42 | 45 | def image_url(self): |
43 | 46 | if self.image and hasattr(self.image, 'url'): | ... | ... |