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 %}
 Just finished running: @@ -14,14 +15,16 @@
{% endif %} + +troggle logo +

Troggle Administration Utilities

-

This control panel is/will/mabe being redeveloped

+

This control panel is/will/maybe being redeveloped

+ + + {% endblock %} \ No newline at end of file diff --git a/urls.py b/urls.py index 72c713fb7..e7c8f2122 100644 --- a/urls.py +++ b/urls.py @@ -123,7 +123,7 @@ else: # admin.site.urls is urls() which maps to get_urls() which is a function declared # in django/contrib/admin/sites.py which for me is -# /home/philip/p11d5/lib/python3.11/site-packages/django/contrib/admin/sites.py +# /home/philip/expo/troggle/.venv/lib/python3.xx/site-packages/django/contrib/admin/sites.py trogglepatterns = [ path('pubs.htm', pubspage, name="pubspage"), # ~165 hrefs to this url in expoweb files @@ -170,7 +170,7 @@ trogglepatterns = [ path('accounts/login/', expologin, name='expologin'), # same as in django.contrib.auth.urls path("accounts/register/", register, name="re_register"), path("accounts/register/", register, name="register"), - path('accounts/', include('django.contrib.auth.urls')), # see site-packages\registration\auth_urls_classes.py + path('accounts/', include('django.contrib.auth.urls')), # see line 109 in this file path('person/', person, name="person"), path('personexpedition//', personexpedition, name="personexpedition"),