mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Change profile to use the correct user display name.
This commit is contained in:
@@ -14,6 +14,7 @@ from django.core.urlresolvers import reverse_lazy
|
||||
from decimal import Decimal
|
||||
|
||||
# Create your models here.
|
||||
@python_2_unicode_compatible
|
||||
class Profile(AbstractUser):
|
||||
initials = models.CharField(max_length=5, unique=True, null=True, blank=False)
|
||||
phone = models.CharField(max_length=13, null=True, blank=True)
|
||||
@@ -37,6 +38,9 @@ class Profile(AbstractUser):
|
||||
def name(self):
|
||||
return self.get_full_name() + ' "' + self.initials + '"'
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class RevisionMixin(object):
|
||||
@property
|
||||
def last_edited_at(self):
|
||||
|
||||
Reference in New Issue
Block a user