fix(ISSUE-8): contd m2m save values (#11)

* feat(ISSUE-8): ISSUE-8: ManyToManyField causes error on confirmations

* feat(ISSUE-8): Update some readme and remove print statements

* feat(ISSUE-8): Generate new version of package

* feat(ISSUE-3): Adding .travis.yml

* feat(ISSUE-3): Adding coveralls

* feat(ISSUE-3): Trying github actions

* feat(ISSUE-3): remove travis

* feat(ISSUE-3): Change python versions to test

* feat(ISSUE-3): Some refactoring and trying tox

* feat(ISSUE-3): Try action matrix

* feat(ISSUE-3): Some more refactors

* feat(ISSUE-3): Fix tests

* feat(ISSUE-3): Refactor/fix tests

* feat(ISSUE-3): Remove tox

* feat(ISSUE-3): Adding pypi version badge to readme

* feat(ISSUE-3): Update readme again

* feat(ISSUE-3): Remove tox from readme

* feat(ISSUE-8): Adding some tests for m2m and fix save value issue

* feat(ISSUE-8): Updating test todos

* feat(ISSUE-8): Finish up the tests

* feat(ISSUE-8): Rename

* feat(ISSUE-8): Update gitignore

Co-authored-by: Thu Trang Pham <thu@joinmodernhealth.com>
This commit is contained in:
Thu Trang Pham
2021-02-19 21:31:30 -08:00
committed by GitHub
parent 9a9dfa75e8
commit 09744c7f2a
10 changed files with 239 additions and 21 deletions
@@ -43,8 +43,10 @@
<form method="post" action="{% url opts|admin_urlname:'change' object_id|admin_urlquote %}">{% csrf_token %}
{% endif %}
{% for key, value in form_data.items %}
<input type="hidden" name="{{ key }}" value="{{ value }}">
{% for key, values in form_data %}
{% for v in values %}
<input type="hidden" name="{{ key }}" value="{{v}}">
{% endfor %}
{% endfor %}
{% 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 %}
@@ -1,4 +1,4 @@
{% if changed_data %}
{% load formatting %} {% if changed_data %}
<div class="changed-data">
<p><b>Confirm Values:</b></p>
<table>
@@ -10,8 +10,8 @@
{% for field, values in changed_data.items %}
<tr>
<td>{{ field }}</td>
<td>{{ values.0 }}</td>
<td>{{ values.1 }}</td>
<td>{{ values.0|format_change_data_field_value }}</td>
<td>{{ values.1|format_change_data_field_value }}</td>
</tr>
{% endfor %}
</table>
@@ -3,10 +3,10 @@
{% block submit-row %}
{% if confirm_change %}
<input hidden name="_confirm_change" />
<input hidden name="_confirm_change" value=True />
{% endif %}
{% if confirm_add %}
<input hidden name="_confirm_add" />
<input hidden name="_confirm_add" value=True />
{% endif %}
{{ block.super }}
{% endblock %}