|
|
@ -1095,6 +1095,7 @@ class TreeNode(models.Model): |
|
|
|
class Meta: |
|
|
|
abstract = True |
|
|
|
root = models.ForeignKey('self', |
|
|
|
related_name="potomci_set", |
|
|
|
null = True, |
|
|
|
blank = False, |
|
|
|
on_delete = models.SET_NULL, # Vrcholy s null kořenem jsou sirotci bez ročníku |
|
|
@ -1105,6 +1106,7 @@ class TreeNode(models.Model): |
|
|
|
on_delete=models.SET_NULL, |
|
|
|
verbose_name="první potomek") |
|
|
|
succ = models.ForeignKey('self', |
|
|
|
related_name="prev", |
|
|
|
null = True, |
|
|
|
blank = True, |
|
|
|
on_delete=models.SET_NULL, |
|
|
|