diff options
| author | Mitch Riedstra <Mitch@riedstra.us> | 2017-11-22 17:39:44 -0500 |
|---|---|---|
| committer | Mitch Riedstra <Mitch@riedstra.us> | 2017-11-22 17:39:44 -0500 |
| commit | f125be2549e5f4f04c8097b7305be2982ccff063 (patch) | |
| tree | 0f408132547f9151707555e4718e7981b5b8f2e8 /app/dispatchAuth/models.py | |
| parent | 63e7134298288514473e86614b51daa40b37cdd7 (diff) | |
| download | dispatch-tracker-f125be2549e5f4f04c8097b7305be2982ccff063.tar.gz dispatch-tracker-f125be2549e5f4f04c8097b7305be2982ccff063.tar.xz | |
Change Drivers to vendors in some locations. Remove description field for uploads, changed to filename. Still need to update template.
Diffstat (limited to 'app/dispatchAuth/models.py')
| -rw-r--r-- | app/dispatchAuth/models.py | 7 |
1 files changed, 6 insertions, 1 deletions
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.""" |
