From b11898728747dac9912cae83e71bee3d3156b990 Mon Sep 17 00:00:00 2001 From: cp-at-mit Date: Mon, 7 Oct 2024 08:20:37 -0400 Subject: [PATCH] fix custom 404 template (#2414) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .secrets.baseline | 4 ++-- main/settings.py | 3 +-- main/urls.py | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index b79d08d3bd..7e8c219f6e 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -193,7 +193,7 @@ "filename": "main/settings.py", "hashed_secret": "09edaaba587f94f60fbb5cee2234507bcb883cc2", "is_verified": false, - "line_number": 955 + "line_number": 954 } ], "pants": [ @@ -240,5 +240,5 @@ } ] }, - "generated_at": "2024-09-16T18:23:36Z" + "generated_at": "2024-10-03T19:08:49Z" } diff --git a/main/settings.py b/main/settings.py index dbbfb3b99a..06ddba98e9 100644 --- a/main/settings.py +++ b/main/settings.py @@ -178,8 +178,6 @@ "wagtail", "modelcluster", "taggit", - # django-fsm-admin - "viewflow", # django-robots "robots", # django-reversion @@ -215,6 +213,7 @@ "mitol.payment_gateway.apps.PaymentGatewayApp", "mitol.olposthog.apps.OlPosthog", # "mitol.oauth_toolkit_extensions.apps.OAuthToolkitExtensionsApp", + "viewflow", ) # Only include the seed data app if this isn't running in prod # if ENVIRONMENT not in ("production", "prod"): diff --git a/main/urls.py b/main/urls.py index 49a238d23a..843de0e724 100644 --- a/main/urls.py +++ b/main/urls.py @@ -26,9 +26,6 @@ from cms.views import instructor_page from main.views import cms_signin_redirect_to_site_signin, index, refine -handler500 = "main.views.handler500" -handler404 = "main.views.handler404" - urlpatterns = [ # NOTE: we only bring in base_urlpatterns so applications can only be created via django-admin path( @@ -94,6 +91,9 @@ + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) ) +handler500 = "main.views.handler500" +handler404 = "main.views.handler404" + if settings.DEBUG: import debug_toolbar # pylint: disable=wrong-import-position, wrong-import-order