{% extends "admin/base_site.html" %} {% load i18n static %} {% block title %}{% trans "Import" %} {{ opts.verbose_name }} {{ block.super }}{% endblock %} {% block extrastyle %}{{ block.super }}{% endblock %} {% block coltype %}colM{% endblock %} {% block bodyclass %}change-form{% endblock %} {% block breadcrumbs %} {% endblock %} {% block content_title %}

{% trans "import"|capfirst %}

{% endblock %} {% block content %}
{% csrf_token %}

1. {% trans "Upload file" %}

{% if import_form.non_field_errors %}

{% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

{{ import_form.form.non_field_errors }} {% endif %} {% for field in import_form %}
{% if field.is_checkbox %} {{ field.field }}{{ field.label_tag }} {% else %} {{ field.label_tag }} {% if field.is_readonly %}

{{ field.contents }}

{% else %} {{ field }} {% endif %} {% endif %} {% if field.field.field.help_text %}

{{ field.field.field.help_text|safe }}

{% endif %}
{% endfor %}
{% if sheet_head %}
{% csrf_token %}

2. {% trans "Assign columns" %}

{% if column_assign_form.non_field_errors %}

{% blocktrans count errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}

{{ column_assign_form.form.non_field_errors }} {% endif %} {% for row in sheet_head %} {% for cell in row %} {% if forloop.parentloop.first %} {% else %} {% endif %} {% endfor %} {% endfor %} {% for field in column_assign_form %} {% endfor %}
{{cell.value}}{{cell.value}}
{{ field }}
{% endif %} {% if partial_form %}
{% csrf_token %}

3. {% trans "define default values"|capfirst %}

{{ partial_form.non_field_errors }} {% for field in partial_form %}
{{field.errors}} {% if field.is_checkbox %} {{ field.field }}{{ field.label_tag }} {% else %} {{ field.label_tag }} {{ field }} {% endif %} {% if field.field.field.help_text %}

{{ field.field.field.help_text|safe }}

{% endif %}
{% endfor %}
{% endif %} {% if import %}

{% trans "result"|capfirst %}

{% trans "errors" %}

{% if import.errors %} {% for error in import.errors %} {{error.0}} {{error.1}} {% endfor %} {% else %}

{% trans "There were no errors" %}

{% trans "number of imports"|capfirst %}

{{import.count}}

{% if dry_run %}

{% trans "this was a dry run" %}

{% endif %} {% endif %} {% endif %}
{% endblock %}