1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 14:38:24 +02:00

Upload to the good place

This commit is contained in:
Yohann D'ANELLO
2021-01-12 17:51:55 +01:00
parent 2ca0444053
commit ead59e28b8
4 changed files with 20 additions and 13 deletions

View File

@ -19,9 +19,7 @@
<dt class="col-sm-2">{% trans "Solutions:" %}</dt>
<dd class="col-sm-10">
{% for solution in participation.solutions.all %}
<a href="{% url "solution" filename=solution.file %}">
{% blocktrans trimmed with problem=solution.problem %}problem {{ problem }}{% endblocktrans %}{% if not forloop.last %}, {% endif %}
</a>
<a href="{{ solution.file.url }}">{{ solution }}{% if not forloop.last %}, {% endif %}</a>
{% empty %}
{% trans "No solution was uploaded yet." %}
{% endfor %}
@ -36,7 +34,7 @@
{% trans "Upload solution" as modal_title %}
{% trans "Upload" as modal_button %}
{% url "participation:upload_solution" pk=participation.pk as modal_action %}
{% include "base_modal.html" with modal_id="uploadSolution" %}
{% include "base_modal.html" with modal_id="uploadSolution" modal_enctype="multipart/form-data" %}
{% endblock %}
{% block extrajavascript %}

View File

@ -3,7 +3,7 @@
{% load crispy_forms_filters i18n %}
{% block content %}
<form method="post">
<form method="post" enctype="multipart/form-data">
<div id="form-content">
{% csrf_token %}
{{ form|crispy }}