From f125be2549e5f4f04c8097b7305be2982ccff063 Mon Sep 17 00:00:00 2001 From: Mitch Riedstra Date: Wed, 22 Nov 2017 17:39:44 -0500 Subject: Change Drivers to vendors in some locations. Remove description field for uploads, changed to filename. Still need to update template. --- app/dispatchAuth/models.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/dispatchAuth') diff --git a/app/dispatchAuth/models.py b/app/dispatchAuth/models.py index a1c4b55..fe720fd 100644 --- a/app/dispatchAuth/models.py +++ b/app/dispatchAuth/models.py @@ -67,7 +67,12 @@ class User(PermissionsMixin, AbstractBaseUser): return reverse('driver_details', kwargs={'pk': self.pk}) def __str__(self): - return self.email + # return self.email + # Show the Identity associated with the user, not the user itself + try: + return "{} ({} {})".format(self.identity, self.first_name, self.last_name) + except: + return "{} {} ({})".format(self.first_name, self.last_name, self.email) def email_user(self, subject, message, from_email=None, **kwargs): """Send an email to this user.""" -- cgit v1.2.3