{% extends 'base.html' %}
{% block title %} Home {% endblock %}
{% block content %}
{% if user.is_authenticated %}
Hi {{ user.username }}!<br>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Upload</button>
</form>
{% if file_url %}
<h3>Succesfully uploaded</h3>
<img src="{{ file_url }}" alt="connect" style="max-height:300px">
{% endif %}
{% else %}
<p>You are not logged in</p>
<a href="{% url 'login' %}">Log In</a>
{% endblock %}