summaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-02-19 16:00:53 +0200
committerPhilip Sargent <philip.sargent@gmail.com>2025-02-19 16:00:53 +0200
commita950cc60d9400c553b853f3a3308edaa8ea645cc (patch)
tree2d9ba95d09d74355fc329b4e3bd093ea4ac30de8 /settings.py
parentcc06e2e1f4bdfbf354d79055595980a1bdef495c (diff)
downloadtroggle-a950cc60d9400c553b853f3a3308edaa8ea645cc.tar.gz
troggle-a950cc60d9400c553b853f3a3308edaa8ea645cc.tar.bz2
troggle-a950cc60d9400c553b853f3a3308edaa8ea645cc.zip
tidy trailing slash everywhere & fix tests
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/settings.py b/settings.py
index 486d494..e8a0022 100644
--- a/settings.py
+++ b/settings.py
@@ -113,7 +113,7 @@ FORM_RENDERER = "django.forms.renderers.TemplatesSetting" # Required to customi
# see https://docs.djangoproject.com/en/dev/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware
# Seriously, read this: https://www.webforefront.com/django/middlewaredjango.html which is MUCH BETTER than the docs
-# We are NOT using the home-built SmartAppendSlashMiddleware
+# We are NOT using the home-built TroggleAppendSlashMiddleware, NOR are we using the Django system append_slash
MIDDLEWARE = [
#'django.middleware.security.SecurityMiddleware', # SECURE_SSL_REDIRECT and SECURE_SSL_HOST # we don't use this
"django.middleware.gzip.GZipMiddleware", # not needed when expofiles and photos served by apache
@@ -128,11 +128,12 @@ MIDDLEWARE = [
#"troggle.core.middleware.TroggleAppendSlashMiddleware", # modified Feb.2025
]
-WSGI_APPLICATION = "troggle.wsgi.application" # change to asgi as soon as we upgrade to Django 3.0
+WSGI_APPLICATION = "troggle.wsgi.application" # change to asgi as soon as we upgrade to Django 5 ?
# Append slash can't work if we have a universal catchall URL rule, and we do because all the handbook files
# do not have simple prefix. This is why we used to have an /expoweb/ prefix for everything in the website.
-# APPEND_SLASH = True # using django.middleware.common.CommonMiddleware. Pointless, never happens if there is a catchall.
-# TROGGLE_APPEND_SLASH = True # this is our middleware: see the code in troggle/core/middleware.py for why we do NOT use it.
+# Also site-media etc.
+APPEND_SLASH = False # using django.middleware.common.CommonMiddleware which we need for other things (I think).
+
QM_PATTERN = r"\[\[\s*[Qq][Mm]:([ABC]?)(\d{4})-(\d*)-(\d*)\]\]"
# Re-enable TinyMCE when Dj upgraded to v3. Also templates/editexpopage.html