Skip to content
Snippets Groups Projects
Commit d2771aea authored by Martin Mareš's avatar Martin Mareš
Browse files

Import: Hezčí hlášení chyb

parent 09ad10b9
Branches
No related tags found
1 merge request!15WIP: Reforma importů
This commit is part of merge request !15. Comments created here will be created in the context of that merge request.
...@@ -297,7 +297,6 @@ def generic_import(round: db.Round, contest: Optional[db.Contest]): ...@@ -297,7 +297,6 @@ def generic_import(round: db.Round, contest: Optional[db.Contest]):
else: else:
return redirect(url_for('org_round', id=round.round_id)) return redirect(url_for('org_round', id=round.round_id))
else: else:
flash('Došlo k chybě při importu (detaily níže)', 'danger')
errs = imp.errors errs = imp.errors
else: else:
flash('Vyberte si prosím soubor', 'danger') flash('Vyberte si prosím soubor', 'danger')
... ...
......
...@@ -13,11 +13,12 @@ ...@@ -13,11 +13,12 @@
{% if errs %} {% if errs %}
<h3>Chyby při importu</h3> <h3>Chyby při importu</h3>
<pre>
<pre><div class="alert alert-danger" role="alert">{{ "" -}}
{% for e in errs %} {% for e in errs %}
{{ e }} {{ e }}
{% endfor %} {% endfor %}
</pre> </div></pre>
{% endif %} {% endif %}
<p>Zde je možné importovat účastníky soutěže, dozor na soutěžních místech a opravovatele. <p>Zde je možné importovat účastníky soutěže, dozor na soutěžních místech a opravovatele.
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment