diff --git a/core/views/other.py b/core/views/other.py index b97ea9aee..f1cd6ac8c 100644 --- a/core/views/other.py +++ b/core/views/other.py @@ -159,7 +159,8 @@ def controlpanel(request): return render( request, "controlPanel.html", - {"error": 'You are logged in, but not logged in as "expoadmin". \nLogout and login again to contnue.', "year": current_expo()} + {"error": ' - Needs "expoadmin" logon. \nLogout and login again.', + "year": current_expo()} ) else: diff --git a/settings.py b/settings.py index 1e2303e85..d201b4cca 100644 --- a/settings.py +++ b/settings.py @@ -83,8 +83,9 @@ APPEND_SLASH = ( ) SMART_APPEND_SLASH = True # not eorking as middleware different after Dj2.0 - -LOGIN_REDIRECT_URL = "/" # does not seem to have any effect +ROOT_URLCONF = "troggle.urls" +LOGOUT_REDIRECT_URL = "/statistics" # see troggle/core/views/auth.py +LOGIN_REDIRECT_URL = "/controlpanel" # see troggle/core/views/auth.py SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_BROWSER_XSS_FILTER = True @@ -126,8 +127,6 @@ MIDDLEWARE = [ #'troggle.core.middleware.SmartAppendSlashMiddleware' # needs adapting after Dj2.0 ] -ROOT_URLCONF = "troggle.urls" - WSGI_APPLICATION = "troggle.wsgi.application" # change to asgi as soon as we upgrade to Django 3.0 ACCOUNT_ACTIVATION_DAYS = 3 diff --git a/templates/controlPanel.html b/templates/controlPanel.html index b8f66d5ee..acbd1c841 100644 --- a/templates/controlPanel.html +++ b/templates/controlPanel.html @@ -1,6 +1,7 @@ {% extends "base.html" %} {% block content %} + {% if jobs_completed %}
+