summaryrefslogtreecommitdiff
path: root/postgresqleu/settings.py
diff options
context:
space:
mode:
authorMagnus Hagander2020-04-14 13:00:35 +0000
committerMagnus Hagander2020-04-14 13:00:35 +0000
commit75bd04e991b1c5c5c18acd6c77f0facc2b740279 (patch)
treeb42a4481acc943fc42ba908368f024b324910795 /postgresqleu/settings.py
parentb1816895690884820f18f33a7ccaec4a7718f058 (diff)
Enforce the timezone is reset between requests
Turns out django does not reset the timezone on requests, unless it's done explicitly. So add a new middleware that does exactly this -- and then individual requests will set it back to the conference timezone as required. Not doing this could lead to very interesting results in a multi-threaded server...
Diffstat (limited to 'postgresqleu/settings.py')
-rw-r--r--postgresqleu/settings.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/postgresqleu/settings.py b/postgresqleu/settings.py
index 003df6a6..ccfcfa8a 100644
--- a/postgresqleu/settings.py
+++ b/postgresqleu/settings.py
@@ -62,6 +62,7 @@ MIDDLEWARE = [
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'postgresqleu.util.middleware.RedirectMiddleware',
+ 'postgresqleu.util.middleware.TzMiddleware',
]
CSRF_FAILURE_VIEW = 'postgresqleu.views.csrf_failure'