mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-25 17:32: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
|
from decimal import Decimal
|
||||||
|
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
|
@python_2_unicode_compatible
|
||||||
class Profile(AbstractUser):
|
class Profile(AbstractUser):
|
||||||
initials = models.CharField(max_length=5, unique=True, null=True, blank=False)
|
initials = models.CharField(max_length=5, unique=True, null=True, blank=False)
|
||||||
phone = models.CharField(max_length=13, null=True, blank=True)
|
phone = models.CharField(max_length=13, null=True, blank=True)
|
||||||
@@ -37,6 +38,9 @@ class Profile(AbstractUser):
|
|||||||
def name(self):
|
def name(self):
|
||||||
return self.get_full_name() + ' "' + self.initials + '"'
|
return self.get_full_name() + ' "' + self.initials + '"'
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.name
|
||||||
|
|
||||||
class RevisionMixin(object):
|
class RevisionMixin(object):
|
||||||
@property
|
@property
|
||||||
def last_edited_at(self):
|
def last_edited_at(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user