index.html 401 Bytes
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
 <h1>TEST!</h1>
    <form action="" method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <input type="file" name="img-file">
        <input type="submit">
    </form>
{% if object.img %}
    <img src="{{ object.img.url }}" alt="">
{% else %}
{% endif %}
</body>
</html>