{% extends "admin/base_site.html" %}
{% comment %}
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
{% endcomment %}
{% load proto_tags %}
{% load i18n %}

{% block content %}
<h2>Carregar posicionamento de equipamentos a partir de um arquivo csv</h2>

{% if request.method == 'GET' %}
<form method="POST" enctype="multipart/form-data">{% csrf_token %}
    <input id="racks_id" name="racks" type="file">
    <input type="submit" value="Enviar">
</form>

{% else %}
<h4>Ok com:</h4>
<ul>
{% for l in ok %}
<li>{{ l.apelido }} {{ l }}</li>
{% endfor %}
</ul>

<h4>Falha com:</h4>
<ul>
{% for l in failed %}
<li>{{ l.apelido }} {{ l }}</li>
{% endfor %}
</ul>

{% endif %}

{% endblock %}

