Basic user profile edit form

This commit is contained in:
Skia
2015-11-24 15:52:27 +01:00
parent 259182c1c4
commit ebcdcf4245
4 changed files with 36 additions and 5 deletions

View File

@ -65,6 +65,17 @@ class User(AbstractBaseUser, PermissionsMixin):
def __str__(self):
return self.username
def to_dict(self):
return self.__dict__
def get_profile(self):
return {
"last_name": self.last_name,
"first_name": self.first_name,
"nick_name": self.nick_name,
"date_of_birth": self.date_of_birth,
}
def get_full_name(self):
"""
Returns the first_name plus the last_name, with a space in between.