{% extends "demonstration/base.html" %}

{% block body %}
    <form action="" method="post" name="upload-form" enctype="multipart/form-data">
        {% csrf_token %}
        <table class="form-table">
            {{ form.as_table }}
            <tr>
                <th></th>
                <td><input type="submit" name="submit-form" value="Upload file"></td>
            </tr>
        </table>
    </form>
    <hr>
    {% if image_url %}
        The image was successfully uploaded at <a href="{{ image_url }}">{{ image_url }}</a>
        <p>
            <img src="{{ image_url }}" alt="Uploaded image">
        </p>
    {% endif %}
{% endblock body %}
