{% extends "base.html" %}

{% load static %}

{% block title %}My amazing submission{% endblock %}

{% block content %}

{{ form.media }}

{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

{% if user.is_authenticated %}


<h1>Submit some amazing content!</h1>

<form action="{% url 'news:submission' %}" method="post" enctype="multipart/form-data">
  {% csrf_token %}
  {{ form }}
  <button class="primary_button" type="submit">Submit</button>
</form>

{% else %}
<a href="../admin/login">Please log in</a>
{% endif %}

{% endblock content %}
