Refactor model layout

This commit is contained in:
Seamus Johnston 2022-11-10 08:26:06 -06:00
parent 349659be90
commit 8b8ade428b
No known key found for this signature in database
GPG key ID: 2F21225985069105
11 changed files with 522 additions and 462 deletions

View file

@ -0,0 +1,17 @@
from django.contrib.auth.models import AbstractUser
class User(AbstractUser):
"""
A custom user model that performs identically to the default user model
but can be customized later.
"""
def __str__(self):
# this info is pulled from Login.gov
if self.first_name or self.last_name:
return f"{self.first_name or ''} {self.last_name or ''}"
elif self.email:
return self.email
else:
return self.username