Skip to content

Commit e676a8c

Browse files
committed
add login and logout templates to override allauth default templates #1895
1 parent 9de1ccd commit e676a8c

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

login/templates/account/login.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends "base/base-full.html" %}
1+
{% extends "account/base.html" %}
22
{% load base_tags %}
33
{% load socialaccount %}
44

@@ -11,7 +11,7 @@
1111
{% translate "Sign In" %}
1212
{% endblock head_title %}
1313

14-
{% block main-content-body %}
14+
{% block content %}
1515

1616
{% block inner %}
1717
<h1>{% translate "Sign In" %}</h1>

login/templates/account/logout.html

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{% extends "account/base.html" %}
2+
3+
{% load i18n %}
4+
5+
{% block head_title %}
6+
{% translate "Sign Out" %}
7+
{% endblock head_title %}
8+
{% block inner %}
9+
<h1>{% translate "Sign Out" %}</h1>
10+
<p>{% translate "Are you sure you want to sign out?" %}</p>
11+
<form method="post" action="{% url 'account_logout' %}">
12+
{% csrf_token %}
13+
{% if redirect_field_value %}
14+
<input type="hidden"
15+
name="{{ redirect_field_name }}"
16+
value="{{ redirect_field_value }}" />
17+
{% endif %}
18+
<button class="btn btn-danger" type="submit">{% translate "Sign Out" %}</button>
19+
</form>
20+
{% endblock inner %}

0 commit comments

Comments
 (0)