smartcourseevaluation/smart_course_evaluation/reports/templates/reports/upload.html

38 lines
1.1 KiB
HTML

<!-- templates/reports/upload.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload CSV</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body class="bg-light">
<div class="container mt-5">
<div class="card p-4 shadow-sm">
<h2 class="mb-3">Upload CSV File for Evaluation</h2>
{% if error %}
<div class="alert alert-danger">{{ error }}</div>
{% endif %}
<form method="POST" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="btn btn-primary">Upload and View Charts</button>
</form>
</div>
{% if charts %}
<div class="mt-5">
{% for chart in charts %}
<div class="mb-4">
<img src="data:image/png;base64,{{ chart }}" class="img-fluid border shadow-sm" />
</div>
{% endfor %}
</div>
{% endif %}
</div>
</body>
</html>