Skip to content
Snippets Groups Projects
Commit 00eb4384 authored by Martin Mareš's avatar Martin Mareš
Browse files

mo.db.User: full_email()

parent bdbe4c1d
No related branches found
No related tags found
1 merge request!127E-maily školních garantů účastníků
......@@ -416,6 +416,9 @@ class User(Base):
def full_name(self) -> str:
return self.first_name + ' ' + self.last_name
def full_email(self) -> str:
return f'{self.first_name} {self.last_name} <{self.email}>'
def sort_key(self) -> Tuple[str, str, int]:
return (locale.strxfrm(self.last_name), locale.strxfrm(self.first_name), self.user_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment