posaune
authorMichael J.M. Wagner <michael@wagnertech.de>
Mon, 29 Jan 2024 16:31:03 +0000 (17:31 +0100)
committerMichael J.M. Wagner <michael@wagnertech.de>
Mon, 29 Jan 2024 16:31:03 +0000 (17:31 +0100)
python/eh_util/eh_abgleich/migrations/__init__.py [new file with mode: 0644]
python/eh_util/eh_abgleich/templates/__init__.py [new file with mode: 0644]
python/eh_util/eh_abgleich/templates/list.html [new file with mode: 0644]

diff --git a/python/eh_util/eh_abgleich/migrations/__init__.py b/python/eh_util/eh_abgleich/migrations/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/python/eh_util/eh_abgleich/templates/__init__.py b/python/eh_util/eh_abgleich/templates/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/python/eh_util/eh_abgleich/templates/list.html b/python/eh_util/eh_abgleich/templates/list.html
new file mode 100644 (file)
index 0000000..00aadd2
--- /dev/null
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <title>Minimal Django File Upload Example</title>
+    </head>
+
+    <body>
+        <!-- List of uploaded documents -->
+        {% if documents %}
+            <ul>
+                {% for document in documents %}
+                    <li><a href="{{ document.docfile.url }}">{{ document.docfile.name }}</a></li>
+                {% endfor %}
+            </ul>
+        {% else %}
+            <p>No documents.</p>
+        {% endif %}
+
+        <!-- Upload form. Note enctype attribute! -->
+        <form action="{% url 'list' %}" method="post" enctype="multipart/form-data">
+            {% csrf_token %}
+            <p>{{ form.non_field_errors }}</p>
+
+            <p>{{ form.docfile.label_tag }} {{ form.docfile.help_text }}</p>
+
+            <p>
+                {{ form.docfile.errors }}
+                {{ form.docfile }}
+            </p>
+            
+           
+
+            <p><input type="submit" value="Upload"/></p>
+        </form>
+    </body>
+
+</html>