Add auth pages

This commit is contained in:
James Graham
2020-01-30 14:28:58 +00:00
parent 61a123f508
commit 141759479b
3 changed files with 33 additions and 0 deletions

View File

@@ -16,6 +16,8 @@ https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
import collections import collections
import pathlib import pathlib
from django.urls import reverse_lazy
from decouple import config, Csv from decouple import config, Csv
import dj_database_url import dj_database_url
@@ -150,6 +152,12 @@ AUTH_PASSWORD_VALIDATORS = [
AUTH_USER_MODEL = 'people.User' AUTH_USER_MODEL = 'people.User'
# Login flow
LOGIN_URL = reverse_lazy('login')
LOGIN_REDIRECT_URL = reverse_lazy('index')
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/2.2/topics/i18n/ # https://docs.djangoproject.com/en/2.2/topics/i18n/

View File

@@ -0,0 +1,10 @@
{% extends 'base.html' %}
{% load bootstrap4 %}
{% block content %}
<h1>Logged Out</h1>
<p>
You have logged out
</p>
{% endblock %}

View File

@@ -0,0 +1,15 @@
{% extends 'base.html' %}
{% load bootstrap4 %}
{% block content %}
<h1>Login</h1>
<form action="" method="post">
{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<input type="hidden" name="next" value="{{ next }}">
<input type="submit" class="btn btn-info" value="Login">
{% endbuttons %}
</form>
{% endblock %}