Browse Source

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

export_seznamu_prednasek
parent
commit
be7d587b82
  1. 1
      seminar/admin.py
  2. 1
      seminar/templates/seminar/treenode_recursive.html

1
seminar/admin.py

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

1
seminar/templates/seminar/treenode_recursive.html

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

Loading…
Cancel
Save