From 877396f149ccf2e95f1789d49402b40cb172384a Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Thu, 21 Jul 2022 13:49:43 +0100 Subject: [PATCH] Fix logout redirect --- app/settings.py | 6 ++++-- core/templates/index.html | 12 ++++++----- core/templates/registration/logout.html | 0 core/templates/ui/drilldown.html | 27 +++++++++++++++++++------ 4 files changed, 32 insertions(+), 13 deletions(-) create mode 100644 core/templates/registration/logout.html diff --git a/app/settings.py b/app/settings.py index b59f1ba..5ab993e 100644 --- a/app/settings.py +++ b/app/settings.py @@ -31,13 +31,13 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ + "core", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", - "core", "crispy_forms", "crispy_bulma", ] @@ -126,7 +126,9 @@ DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" AUTH_USER_MODEL = "core.User" -LOGIN_REDIRECT_URL = "/" +LOGIN_REDIRECT_URL = "home" +LOGOUT_REDIRECT_URL = "home" +LOGIN_URL = "/accounts/login/" # ALLOWED_PAYMENT_METHODS = ["bacs_debit", "card"] ALLOWED_PAYMENT_METHODS = ["card"] diff --git a/core/templates/index.html b/core/templates/index.html index 7460795..7f43b98 100644 --- a/core/templates/index.html +++ b/core/templates/index.html @@ -1,10 +1,12 @@ {% extends "base.html" %} {% block content %} -

Pathogen Data Insights

-
-

Welcome to the Neptune system

-
-

Hello!

+
+

Pathogen Data Insights

+
+

Welcome to the Neptune system

+
+

Hello!

+
{% endblock %} diff --git a/core/templates/registration/logout.html b/core/templates/registration/logout.html new file mode 100644 index 0000000..e69de29 diff --git a/core/templates/ui/drilldown.html b/core/templates/ui/drilldown.html index 5da3b48..83b0704 100644 --- a/core/templates/ui/drilldown.html +++ b/core/templates/ui/drilldown.html @@ -118,12 +118,27 @@
-

{{ card }} hits

-

{{ redacted }} redacted

- {% if exemption is not None %} -

redaction overriden by superuser

- {% endif %} -

{{ took }}ms

+
+
+
+

{{ card }} hits

+
+ {% if redacted != 0 %} +
+

{{ redacted }} redacted

+
+ {% endif %} + + {% if exemption is not None %} +
+

god mode

+
+ {% endif %} +
+

{{ took }}ms

+
+
+
{% endif %} {% endblock %}