mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
Add auth pages
This commit is contained in:
@@ -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/
|
||||||
|
|||||||
10
breccia_mapper/templates/registration/logged_out.html
Normal file
10
breccia_mapper/templates/registration/logged_out.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load bootstrap4 %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Logged Out</h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You have logged out
|
||||||
|
</p>
|
||||||
|
{% endblock %}
|
||||||
15
breccia_mapper/templates/registration/login.html
Normal file
15
breccia_mapper/templates/registration/login.html
Normal 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 %}
|
||||||
Reference in New Issue
Block a user