From f2a42ab6fe3f3c2475e357b5d37b56d441c05009 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Sat, 6 Jan 2018 18:51:16 +0000 Subject: [PATCH] Add catch-all redirect for /admin/ --- src/paperless/urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/paperless/urls.py b/src/paperless/urls.py index 4f8b69e41..89852b1d2 100644 --- a/src/paperless/urls.py +++ b/src/paperless/urls.py @@ -43,7 +43,9 @@ urlpatterns = [ # The Django admin url(r"admin/", admin.site.urls), - url(r"", admin.site.urls), # This is going away + + # Catch all redirect back to /admin + url(r"", RedirectView.as_view(permanent=True, url="/admin/")), ] + static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)