38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
{% extends "base.djhtml" %}
|
|
|
|
{% load widget_tweaks %}
|
|
|
|
{% block title %} Login {% endblock %}
|
|
|
|
{% block content %}
|
|
{% if form.errors %}
|
|
<p class="alert alert-danger">Your username and password didn't match. Please try again.</p>
|
|
{% endif %}
|
|
|
|
{% if next %}
|
|
{% if user.is_authenticated %}
|
|
<p class="alert alert-danger">
|
|
Your account doesn't have access to this page. To proceed,
|
|
please login with an account that has access.
|
|
</p>
|
|
{% else %}
|
|
<p class="alert alert-info">Please login to see this page.</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<form class="d-flex flex-column align-items-center" method="post" action="{% url 'login' %}">
|
|
{% csrf_token %}
|
|
{% for field in form %}
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label" for="{{ field.auto_id }}">{{ field.label }}</label>
|
|
<div class="col-sm-8">
|
|
{% render_field field class="form-control" %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
<input type="submit" class="btn btn-primary" value="login" />
|
|
<input type="hidden" name="next" value="{{ next }}" />
|
|
</form>
|
|
|
|
{% endblock %}
|