source: asadb/template/midway/upload.html

space-accessstablestage
Last change on this file was 83759bf, checked in by Alex Dehnert <adehnert@…>, 13 years ago

Prevent 500'ing while uploading midway assignments

Add some documentation and improved error messages when uploading midway
assignments. (Fixes ASA-#224.)

  • Property mode set to 100644
File size: 1.4 KB
Line 
1{% extends "base.html" %}
2
3{% block title %}ASA: {{midway.name}}: upload assignments{% endblock %}
4{% block content %}
5<h1>{{midway.name}}: upload assignments</h1>
6
7{% if uploaded %}
8<h2>Results</h2>
9
10<h3>New entries added ({{found|length}})</h3>
11
12<table class='pretty-table'>
13<tr>
14    <th>Group</th>
15    <th>Table</th>
16</tr>
17{% for assignment in found %}
18<tr>
19    <th>{{assignment.group}}</th>
20    <td>{{assignment.location}}</td>
21</tr>
22{% endfor %}
23</table>
24
25{% for issue, cases in issues.items %}
26<h3>Issue: {{issue}} ({{cases|length}})</h3>
27<table class='pretty-table'>
28<tr>
29    <th>Name</th>
30    <th>Email</th>
31    <th>Table</th>
32</tr>
33{% for name, email, table in cases %}
34<tr>
35    <th>{{name}}</th>
36    <td>{{email}}</td>
37    <td>{{table}}</td>
38</tr>
39{% endfor %}
40</table>
41{% endfor %}
42
43<!-- end of results -->
44{% endif %}
45
46<h2>Input</h2>
47
48<p>Include columns "Group", "officers", and "Table". Matching is done on "Group", so try to ensure that your names match the database's.</p>
49
50<form enctype="multipart/form-data" method="post" action="">
51{% csrf_token %}
52<table class='pretty-table'>
53{{ form.as_table }}
54<tr><th colspan='2'><input type='submit' value='Upload Assignments' /></th></tr>
55</table>
56</form>
57
58<p>You may wish to <a href='{% url admin:forms_midwayassignment_changelist %}?midway__id__exact={{midway.pk}}'>modify the assignments</a> or <a href='{% url midway-map midway.slug %}'>view the map</a>.</p>
59
60{% endblock %}
Note: See TracBrowser for help on using the repository browser.