From cb0151fd23c4c8526e94c8f4a728cf32d04afa58 Mon Sep 17 00:00:00 2001 From: Tom Price Date: Fri, 29 May 2015 00:12:26 +0100 Subject: [PATCH] Change profile to use the correct user display name. --- RIGS/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RIGS/models.py b/RIGS/models.py index 1e4cfe6d..380985a5 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -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):