seminar | TreeNode editor - id u TreeNodu, rozumny admin pro CastNode

This commit is contained in:
Tomas "Jethro" Pokorny 2020-05-30 23:52:30 +02:00
parent f7da742fb4
commit be7d587b82
2 changed files with 2 additions and 0 deletions

View file

@ -165,6 +165,7 @@ class TextNodeAdmin(PolymorphicChildModelAdmin):
class TextNodeAdmin(PolymorphicChildModelAdmin):
base_model = m.CastNode
show_in_index = True
fields = ('nadpis',)
@admin.register(m.OrgTextNode)
class TextNodeAdmin(PolymorphicChildModelAdmin):

View file

@ -3,6 +3,7 @@
<div class="borderized parent">
<div class="node_type">
{{obj.node}}
{{obj.node.id}}
{% if obj.node|deletable %}
<button type="submit" formaction="{%url 'treenode_smazat' obj.node.id%}">Smazat</button>
{% endif %}