Admin ReseniNode

This commit is contained in:
Jonas Havelka 2024-11-05 15:07:51 +01:00
parent 527a7b3ea6
commit 1c146ac5c3

View file

@ -4,7 +4,7 @@ from django.forms import widgets
from polymorphic.admin import PolymorphicParentModelAdmin, PolymorphicChildModelAdmin, PolymorphicChildModelFilter
from .models import TreeNode, RocnikNode, CisloNode, MezicisloNode, TemaVCisleNode, UlohaZadaniNode, PohadkaNode, UlohaVzorakNode, TextNode, CastNode, OrgTextNode
from .models import TreeNode, RocnikNode, CisloNode, MezicisloNode, TemaVCisleNode, UlohaZadaniNode, PohadkaNode, UlohaVzorakNode, TextNode, CastNode, OrgTextNode, ReseniNode
from .models import Text, Obrazek
# Polymorfismus pro stromy
@ -24,6 +24,7 @@ class TreeNodeAdmin(PolymorphicParentModelAdmin):
TextNode,
CastNode,
OrgTextNode,
ReseniNode,
]
actions = ['aktualizuj_nazvy']
@ -88,6 +89,10 @@ class TextNodeAdmin(PolymorphicChildModelAdmin):
base_model = OrgTextNode
show_in_index = True
@admin.register(ReseniNode)
class ReseniNodeAdmin(PolymorphicChildModelAdmin):
base_model = ReseniNode
show_in_index = True
class TextAdminInline(admin.TabularInline):
model = Text