Try to fix issue 4

This commit is contained in:
2025-01-22 19:39:16 +09:00
parent 8b9326c360
commit 87096a3da4
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,11 @@
{% extends "admin/change_list.html" %}
{% load i18n %}
{% block object-tools-items %}
{{ block.super }}
<li>
<a href="{% url 'admin:entry_upload_csv' %}" class="addlink">
{% translate "Upload CSV" %}
</a>
</li>
{% endblock %}

View File

@ -0,0 +1,17 @@
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block content %}
<div>
<form action="." method="post" enctype="multipart/form-data">
{% csrf_token %}
<div>
<label for="csv_file">Choose CSV file:</label>
<input type="file" name="csv_file" required>
</div>
<div style="margin-top: 20px;">
<input type="submit" value="Upload CSV">
</div>
</form>
</div>
{% endblock %}