Browse Source

Admin ReseniNode

pull/65/head
Jonas Havelka 2 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 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 from .models import Text, Obrazek
# Polymorfismus pro stromy # Polymorfismus pro stromy
@ -24,6 +24,7 @@ class TreeNodeAdmin(PolymorphicParentModelAdmin):
TextNode, TextNode,
CastNode, CastNode,
OrgTextNode, OrgTextNode,
ReseniNode,
] ]
actions = ['aktualizuj_nazvy'] actions = ['aktualizuj_nazvy']
@ -88,6 +89,10 @@ class TextNodeAdmin(PolymorphicChildModelAdmin):
base_model = OrgTextNode base_model = OrgTextNode
show_in_index = True show_in_index = True
@admin.register(ReseniNode)
class ReseniNodeAdmin(PolymorphicChildModelAdmin):
base_model = ReseniNode
show_in_index = True
class TextAdminInline(admin.TabularInline): class TextAdminInline(admin.TabularInline):
model = Text model = Text

Loading…
Cancel
Save