Browse Source

Admin ReseniNode

pull/65/head
Jonas Havelka 3 weeks ago
parent
commit
1c146ac5c3
  1. 7
      treenode/admin.py

7
treenode/admin.py

@ -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

Loading…
Cancel
Save