login.html
{% block content %}
{% if user.is_authenticated %}
<meta http-equiv="REFRESH" content="0;url=/">
{% else %}
<form method="POST">
{% csrf_token %}
{{ form|crispy }}
<button type="submit" class="btn btn-outline-info">LOGIN</button>
<a href="{% url 'register' %}">SIGN UP</a>
</form>
{% endif %}
{% endblock %}
Top comments (0)