fix(ISSUE-8): try using admin form (#16)

* Remove casting to list in _get_form_data

* feat(ISSUE-8): Use Django's form and hide with css

* feat(ISSUE-8): Updated dev release on testpypi

Co-authored-by: Thu Trang Pham <thu@joinmodernhealth.com>
This commit is contained in:
Thu Trang Pham
2021-02-26 09:56:57 -08:00
committed by GitHub
parent 302e02b1e4
commit cc36492bfe
8 changed files with 113 additions and 126 deletions
@@ -42,12 +42,9 @@
{% include "admin/change_data.html" %}
<form method="post" action="{% url opts|admin_urlname:'change' object_id|admin_urlquote %}">{% csrf_token %}
{% endif %}
{% for key, values in form_data %}
{% for v in values %}
<input type="hidden" name="{{ key }}" value="{{v}}">
{% endfor %}
{% endfor %}
<div class=hidden>
{{ form }}
</div>
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
<div class="submit-row">