Feat: importando productos desde csv.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{% if form.is_multipart %}
|
||||
<form enctype="multipart/form-data" method="post">
|
||||
{% else %}
|
||||
<form method="post">
|
||||
{% endif %}
|
||||
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="Importar">
|
||||
</form>
|
||||
@@ -3,4 +3,5 @@
|
||||
<ul>
|
||||
<li><a href='./comprar'>Comprar</a></li>
|
||||
<li><a href='./compras'>Compras</a></li>
|
||||
<li><a href='./productos_index'>Productos</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<form action="{% url 'don_confiao:import_products' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<fieldset>
|
||||
<legend><h1>Importar Productos</h1></legend>
|
||||
<div class="error_message">
|
||||
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
|
||||
</div>
|
||||
<label for="products_csv">Archivo CSV</label>
|
||||
<input type="file" accept="text/plain, .csv" name="choice" id="products_csv" value="{{ choice.id }}"></br>
|
||||
<input type="submit" value="Importar">
|
||||
</fieldset>
|
||||
</form>
|
||||
Reference in New Issue
Block a user