You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
693 B

# Nefunkční alternativa vestavěného Usera, který má jméno a mail v přidružené Osobě
# from django.contrib.auth.models import User as Django_User
#
# class Uzivatel(Django_User):
# class Meta:
# proxy = True
#
# @property
# def first_name(self):
# osoby = Osoba.objects.filter(user=self)
# if len(osoby) == 0:
# return None
# return osoby.first().krestni_jmeno
#
# @property
# def last_name(self):
# osoby = Osoba.objects.filter(user=self)
# if len(osoby) == 0:
# return None
# return osoby.first().prijmeni
#
# @property
# def email(self):
# osoby = Osoba.objects.filter(user=self)
# if len(osoby) == 0:
# return None
# return osoby.first().email