42c2579b845eea21bf43809770cfa81762266f6c
[myslice.git] / forge / templates / list.html
1 <!DOCTYPE html>
2 <html>
3         <head>
4                 <meta charset="utf-8">
5                 <title>Minimal Django File Upload Example</title>
6         </head>
7         <body>
8         <!-- List of uploaded documents -->
9         {% if documents %}
10                 <ul>
11                 {% for document in documents %}
12                         <li><a href="{{ document.docfile.url }}">{{ document.docfile.name }}</a></li>
13                 {% endfor %}
14                 </ul>
15         {% else %}
16                 <p>No documents.</p>
17         {% endif %}
18
19                 <!-- Upload form. Note enctype attribute! -->
20                 <form action="{% url "ict_education.views.list" %}" method="post" enctype="multipart/form-data">
21                         {% csrf_token %}
22                         <p>{{ form.non_field_errors }}</p>
23                         <p>{{ form.docfile.label_tag }} {{ form.docfile.help_text }}</p>
24                         <p>
25                                 {{ form.docfile.errors }}
26                                 {{ form.docfile }}
27                         </p>
28                         <p><input type="submit" value="Upload" /></p>
29                 </form>
30         </body>
31 </html>