{% extends 'base.html' %}

{% block content %}
<div class="container">
    <div class="row center">
        <div class="col-md-5 mx-auto p-5 shadow-sm border rounded border-primary">
            <p>Already have an account? <a href="{% url 'accounts:login' %}">Login Here</a></p>
            {% if messages %}
            <div class="messages">
                {% for message in messages %}
                <div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                {% endfor %}
            </div>
            {% endif %}
            <form action="" method="POST">
                {% csrf_token %}
                {{ form.as_p }}
                <button type="submit" class="btn btn-primary">Sign Up</button>
            </form>
        </div>
    </div>
</div>
{% endblock %}