{% extends "admin/base_site.html" %} {% load i18n %} {% block title %}{{ title }} | {{ site_title|default:"Django site admin" }}{% endblock %} {% block extrastyle %}{{ block.super }} {% endblock %} {% block content %}
{% blocktranslate trimmed %} Upload a CSV or XLSX file, map its columns to fields, preview what would change, then commit. Nothing is written before the preview; rows with errors are skipped and listed. {% endblocktranslate %} {% translate "Download the template (XLSX)" %} · {% translate "CSV" %}
{% if not job %}| {% translate "Field" %} | {% translate "Kind" %} | {% translate "Required" %} | {% translate "Allowed values" %} |
|---|---|---|---|
{{ spec.name }}{% if spec.name == key %} ({% translate "matches existing rows" %}){% endif %} |
{{ spec.kind }} | {% if spec.required %}{% translate "yes" %}{% else %}—{% endif %} |
{% if spec.choices %}{% for value, label in spec.choices %}{{ value }}{% if not forloop.last %}, {% endif %}{% endfor %}
{% elif spec.target %}{% blocktranslate with lookup=spec.lookup|default:"id" target=spec.target %}the {{ lookup }} of a {{ target }}{% endblocktranslate %}
{% else %}—{% endif %}
|
{{ job.original_name }} — {{ job.rows_total }} {% translate "rows" %}, {% translate "status" %}: {{ job.get_status_display }}
{% if state.status == "uploaded" or state.status == "failed" %} {% if state.error %}{{ state.error }}
{% endif %} {% elif state.status == "previewing" or state.status == "committing" %}{{ state.rows_done }} / {{ state.rows_total }}
{% translate "Running in the background; this page refreshes itself." %}
{% else %} {% with result=state.result %}| {% translate "Row" %} | {% translate "Field" %} | {% translate "Problem" %} |
|---|---|---|
| {{ problem.row }} | {{ problem.field|default:"—" }} | {{ problem.message }} |