1
0
mirror of https://github.com/fspc/workstand.git synced 2025-02-23 09:13:23 -05:00

Add full_name field to be used in serialization.

This commit is contained in:
Drew Larson 2016-06-23 11:01:03 -06:00
parent a11f44485f
commit e22014332e

View File

@ -65,6 +65,10 @@ class Member(AbstractBaseUser, PermissionsMixin):
USERNAME_FIELD = 'email' USERNAME_FIELD = 'email'
# REQUIRED_FIELDS = [] # REQUIRED_FIELDS = []
@property
def full_name(self):
return '{0} {1}'.format(self.first_name, self.last_name)
def get_full_name(self): def get_full_name(self):
# The user is identified by their email address # The user is identified by their email address
if self.first_name and self.last_name: if self.first_name and self.last_name: