{% extends 'base.html' %}

{% block content %}
<div class="row">
    <div class="col-md-12">
        <form action="/login" method="post">
            {{ form.csrf_token }}
            {{ form.next(value=next) }}
            <div class="form-group">
                {{ form.username.label }}
                {{ form.username(class='form-control') }}
            </div>
            <div class="form-group">
                {{ form.password.label }}
                {{ form.password(class='form-control') }}
            </div>
            <div class="form-group">
                <input type="submit" class="form-control" value="Login">
            </div>
        </form>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        {% with messages = get_flashed_messages() %}
            {% for message in messages %}
              <div class="alert alert-info">{{ message }}</div>
            {% endfor %}
        {% endwith %}
    </div>
</div>
{% endblock %}