diff --git a/import_export/resources.py b/import_export/resources.py index 490d33d9e..88ab431d2 100644 --- a/import_export/resources.py +++ b/import_export/resources.py @@ -342,7 +342,7 @@ def import_data(self, dataset, dry_run=False, raise_errors=False, except Exception as e: logging.exception(e) tb_info = traceback.format_exc() - result.base_errors.append(Error(repr(e), tb_info)) + result.base_errors.append(Error(e, tb_info)) if raise_errors: if use_transactions: savepoint_rollback(sp1) diff --git a/import_export/templates/admin/import_export/import.html b/import_export/templates/admin/import_export/import.html index fa0d04cf7..dea1dcf73 100644 --- a/import_export/templates/admin/import_export/import.html +++ b/import_export/templates/admin/import_export/import.html @@ -28,12 +28,7 @@

{% trans "Import" %}

{% trans "This importer will import the following fields: " %} - {% for f in fields %} - {% if forloop.counter0 %} - , - {% endif %} - {{ f }} - {% endfor %} + {{ fields|join:", " }}

@@ -73,7 +68,7 @@

{% trans "Errors" %}

{% for error in errors %}
  • {% trans "Line number" %}: {{ line }} - {{ error.error }} -
    {{ error.row }}
    +
    {{ error.row.values|join:", " }}
    {{ error.traceback|linebreaks }}
  • {% endfor %}