-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixes support for 'MemoryFileUploadHandler' in bulk_update - add `dry_run` option to bulk_update - bulk_update now returns a page with pre/post action field values
- Loading branch information
Showing
9 changed files
with
192 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/adminactions/templates/adminactions/bulk_update_results.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{% extends "admin/change_form.html" %} | ||
{% load i18n admin_modify actions massupdate static %} | ||
{% block extrahead %}{{ block.super }} | ||
<meta name="opts.label" content="{{ opts.label }}"> | ||
{{ media }} | ||
{% endblock %} | ||
|
||
{% block breadcrumbs %}{% if not is_popup %} | ||
<div class="breadcrumbs"> | ||
<a href="../../">{% trans "Home" %}</a> › | ||
<a href="../">{{ opts.app_label|capfirst|escape }}</a> › | ||
<a href=".">{{ opts.verbose_name_plural|capfirst }}</a> › | ||
{{ action_short_description|capfirst }} › Simulate | ||
</div> | ||
{% endif %}{% endblock %} | ||
|
||
{% block content %} | ||
{# {'updated': [{'char': 'AAAA', 'id': '3'}], 'errors': [], 'missing': [], 'duplicates': [], 'changes': {<DemoModel: DemoModel object (3)>: <DemoModel: DemoModel object (3)>}}#} | ||
{# {{ results }}#} | ||
<h1>Bulk Update results {% if dry_run %}(simulated) {% endif %}</h1> | ||
<table class="bulk-update-results"> | ||
<thead> | ||
<tr> | ||
<th>Key</th> | ||
<th>Changes | ||
</th> | ||
</tr> | ||
</thead> | ||
{% for key, changes in results.changes.items %} | ||
<tr> | ||
<td>{{ key }}</td> | ||
<td> | ||
<table> | ||
{% for fld, values in changes.items %} | ||
<tr> | ||
<td>{{ fld }}</td> | ||
<td>{{ values.0 }}</td> | ||
<td>{{ values.1 }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.