summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBojan Mihelac <bmihelac@mihelac.org>2014-10-08 15:09:25 (GMT)
committerBojan Mihelac <bmihelac@mihelac.org>2014-10-08 15:09:25 (GMT)
commit52ae31e60f124bb0b9d2c8817a0bce0b1048f9b7 (patch)
tree4647d7716f32a1f8e559c2a1290808de7efe2d27
parent486113da30c99b61e682b5645e8ed0c24afcbb2d (diff)
parent493fece7b877832210fc94c9f1587d3c00918118 (diff)
downloaddjango-import-export-52ae31e60f124bb0b9d2c8817a0bce0b1048f9b7.zip
django-import-export-52ae31e60f124bb0b9d2c8817a0bce0b1048f9b7.tar.gz
django-import-export-52ae31e60f124bb0b9d2c8817a0bce0b1048f9b7.tar.bz2
Merge pull request #158 from nastyako/master
Added use of get_diff_headers method into import.html template
-rw-r--r--import_export/resources.py1
-rw-r--r--import_export/templates/admin/import_export/import.html2
2 files changed, 2 insertions, 1 deletions
diff --git a/import_export/resources.py b/import_export/resources.py
index a741e6c..4c6a01c 100644
--- a/import_export/resources.py
+++ b/import_export/resources.py
@@ -290,6 +290,7 @@ class Resource(six.with_metaclass(DeclarativeMetaclass)):
back.
"""
result = Result()
+ result.diff_headers = self.get_diff_headers()
if use_transactions is None:
use_transactions = self.get_use_transactions()
diff --git a/import_export/templates/admin/import_export/import.html b/import_export/templates/admin/import_export/import.html
index e01731f..db1979b 100644
--- a/import_export/templates/admin/import_export/import.html
+++ b/import_export/templates/admin/import_export/import.html
@@ -85,7 +85,7 @@
<thead>
<tr>
<th></th>
- {% for field in fields %}
+ {% for field in result.diff_headers %}
<th>{{ field }}</th>
{% endfor %}
</tr>