image feature + refactor
This commit is contained in:
parent
73e019de9a
commit
d64efb663a
13 changed files with 221 additions and 37 deletions
core/templates
|
@ -12,7 +12,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<form method="post" class="space-y-4">
|
||||
<form method="post" class="space-y-4" enctype="multipart/form-data">
|
||||
|
||||
{% load access set_content %}
|
||||
|
||||
|
@ -24,7 +24,11 @@
|
|||
|
||||
{% if field.id_for_label == "id_department" %}
|
||||
|
||||
{% if draft is not None %}
|
||||
{{ field|set_content:draft.department }}
|
||||
{% else %}
|
||||
{{ field }}
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
{% with content=draft.content|access:field.id_for_label %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue