Created merge admin action for Person, Venue and Organisation models. Added template.

This commit is contained in:
David Taylor
2016-04-05 04:18:19 +01:00
parent f13303490a
commit 46434977fb
2 changed files with 63 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
{% extends "admin/base_site.html" %}
{% load i18n l10n %}
{% block content %}
<form action="" method="post">{% csrf_token %}
<p>The following objects will be merged. Please select the 'master' record which you would like to keep. Other records will have associated events moved to the 'master' copy, and then will be deleted.</p>
{% for item in queryset %}
<input type="radio" name="master" value="{{item.pk|unlocalize}}"> {{item.pk}} | {{item}}<br>
{% endfor %}
<div>
{% for obj in queryset %}
<input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}" />
{% endfor %}
<input type="hidden" name="action" value="merge" />
<input type="hidden" name="post" value="yes" />
<input type="submit" value="Merge them" />
</div>
</form>
{% endblock %}