|
@ -1587,3 +1587,35 @@ class Novinky(models.Model): |
|
|
return '[' + str(self.datum) + '] ' + self.text[0:50] |
|
|
return '[' + str(self.datum) + '] ' + self.text[0:50] |
|
|
else: |
|
|
else: |
|
|
return '[' + str(self.datum) + '] ' |
|
|
return '[' + str(self.datum) + '] ' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# FIXME: Tohle nepatří do aplikace 'seminar' |
|
|
|
|
|
# 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 |
|
|