2021-10-08 10:36:59 +02:00
|
|
|
from django.db import models
|
|
|
|
|
2021-11-07 10:47:39 +01:00
|
|
|
from seminar.models import treenode as tm
|
2024-10-23 21:46:19 +02:00
|
|
|
from odevzdavatko.models import Reseni
|
2021-10-08 10:36:59 +02:00
|
|
|
|
2021-11-07 10:47:39 +01:00
|
|
|
class ReseniNode(tm.TreeNode):
|
2022-11-29 00:40:18 +01:00
|
|
|
class Meta:
|
|
|
|
db_table = 'seminar_nodes_otistene_reseni'
|
|
|
|
verbose_name = 'Otištěné řešení (Node)'
|
|
|
|
verbose_name_plural = 'Otištěná řešení (Node)'
|
|
|
|
reseni = models.ForeignKey(Reseni,
|
|
|
|
on_delete=models.PROTECT,
|
|
|
|
verbose_name = 'reseni')
|
|
|
|
|
|
|
|
def aktualizuj_nazev(self):
|
|
|
|
self.nazev = "ReseniNode: "+str(self.reseni)
|
|
|
|
|
|
|
|
def getOdkazStr(self):
|
|
|
|
return str(self.reseni)
|
2021-10-08 10:36:59 +02:00
|
|
|
|