diff --git a/pinaxcon/settings.py b/pinaxcon/settings.py index e4dc7510b1d4c6036753304ccc5323d8e47b4e68..d4a6deb265ca1f339420e69ee9af810e7f7b15a2 100644 --- a/pinaxcon/settings.py +++ b/pinaxcon/settings.py @@ -8,6 +8,7 @@ import saml2 import saml2.saml from datetime import date, datetime, timedelta +import pytz from dataclasses import dataclass @@ -124,7 +125,7 @@ else: ALLOWED_HOSTS = ['127.0.0.1', 'localhost', '*'] -TIME_ZONE = "Australia/Brisbane" +TIME_ZONE = "Australia/Melbourne" DATE_FORMAT = "j F Y" LANGUAGE_CODE = "en-au" @@ -176,12 +177,12 @@ TEMPLATES = [ }, ] -MIDDLEWARE_CLASSES = [ +MIDDLEWARE = [ + "whitenoise.middleware.WhiteNoiseMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.auth.middleware.SessionAuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "debug_toolbar.middleware.DebugToolbarMiddleware", "reversion.middleware.RevisionMiddleware", @@ -200,6 +201,7 @@ else: WSGI_APPLICATION = "pinaxcon.wsgi.application" INSTALLED_APPS = [ + "whitenoise.runserver_nostatic", "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", @@ -224,6 +226,7 @@ INSTALLED_APPS = [ "taggit", "reversion", "sitetree", + "django_jsonfield_backport", "pinax.eventlog", # symposion @@ -283,9 +286,12 @@ DEBUG_TOOLBAR_PANELS = [ DEBUG_TOOLBAR_CONFIG = { 'INTERCEPT_REDIRECTS': False, - 'SHOW_TOOLBAR_CALLBACK': lambda x: DEBUG, } +INTERNAL_IPS = [ + '127.0.0.1', +] + from debug_toolbar.panels.logging import collector LOGGING = { 'version': 1, @@ -502,9 +508,10 @@ class PenguinDinnerCat(Category): return t -LCA_START = datetime(2021, 1, 23) -LCA_END = datetime(2021, 1, 25) -EARLY_BIRD_DEADLINE = datetime(2020, 12, 1) +_TZINFO = pytz.timezone(TIME_ZONE) +LCA_START = datetime(2021, 1, 23, tzinfo=_TZINFO) +LCA_END = datetime(2021, 1, 25, tzinfo=_TZINFO) +EARLY_BIRD_DEADLINE = datetime(2020, 12, 1, tzinfo=_TZINFO) PENGUIN_DINNER_TICKET_DATE = date(2021, 1, 23) SPEAKER_DINNER_TICKET_DATE = date(2021, 1, 25) PDNS_TICKET_DATE = date(2021, 1, 24)