|
|
@ -384,8 +384,8 @@ class Rocnik(SeminarModelBase): |
|
|
|
cache.set(name, c, 300) |
|
|
|
return c |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
self.rocniknode.save() |
|
|
|
|
|
|
@ -481,8 +481,8 @@ class Cislo(SeminarModelBase): |
|
|
|
return None |
|
|
|
return c |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
self.cislonode.save() |
|
|
|
|
|
|
@ -716,8 +716,8 @@ class Tema(Problem): |
|
|
|
return "t{}".format(self.kod) |
|
|
|
return '<Není zadaný>' |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
for tvcn in self_temavcislenode_set: |
|
|
|
tvcn.save() |
|
|
@ -742,8 +742,8 @@ class Clanek(Problem): |
|
|
|
return "c{}".format(self.kod) |
|
|
|
return '<Není zadaný>' |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
self.claneknode.save() |
|
|
|
|
|
|
@ -764,8 +764,8 @@ class Text(SeminarModelBase): |
|
|
|
|
|
|
|
# obrázky mají návaznost opačným směrem (vazba z druhé strany) |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
for tn in self.textnode_set: |
|
|
|
tn.save() |
|
|
@ -804,8 +804,8 @@ class Uloha(Problem): |
|
|
|
return name |
|
|
|
return '<Není zadaný>' |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
self.ulohazadaninode.save() |
|
|
|
self.ulohavzoraknode.save() |
|
|
@ -991,8 +991,8 @@ class Pohadka(SeminarModelBase): |
|
|
|
uryvek = self.text if len(self.text) < 50 else self.text[:(50-3)]+"..." |
|
|
|
return uryvek |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
self.pohadkanode.save() |
|
|
|
|
|
|
@ -1105,8 +1105,8 @@ class Konfera(models.Model): |
|
|
|
def __str__(self): |
|
|
|
return "{}: ({})".format(self.nazev, self.soustredeni) |
|
|
|
|
|
|
|
def save(self): |
|
|
|
super().save() |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
super().save(*args, **kwargs) |
|
|
|
# *Node.save() aktualizuje název *Nodu. |
|
|
|
self.konferanode.save() |
|
|
|
|
|
|
@ -1224,9 +1224,9 @@ class TreeNode(PolymorphicModel): |
|
|
|
#TODO: logování |
|
|
|
return "Nepojmenovaný Treenode" |
|
|
|
|
|
|
|
def save(self): |
|
|
|
def save(self, *args, **kwargs): |
|
|
|
self.aktualizuj_nazev() |
|
|
|
super().save() |
|
|
|
super().save(*args, **kwargs) |
|
|
|
|
|
|
|
class RocnikNode(TreeNode): |
|
|
|
class Meta: |
|
|
|