From 01ed8ac2f9364f824428c821049ddba7c634ebfc Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Thu, 2 Jul 2020 21:49:48 +0200 Subject: [PATCH] fix login urls --- acros/urls.py | 2 +- common/redirect.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acros/urls.py b/acros/urls.py index f95b2a6..cd782fa 100644 --- a/acros/urls.py +++ b/acros/urls.py @@ -18,7 +18,7 @@ sitemaps = { } urlpatterns = [ - path('', include('django.contrib.auth.urls')), + path('account/', include('django.contrib.auth.urls')), path("sitemap.xml", cache_page(60 * 15)(sitemap), {"sitemaps": sitemaps}, name="sitemap"), path('api/', include(router.urls)), path('', views.IndexView.as_view(), name='index'), diff --git a/common/redirect.py b/common/redirect.py index f11ad44..0d10c0a 100644 --- a/common/redirect.py +++ b/common/redirect.py @@ -11,7 +11,7 @@ class NoTrailingSlashMiddleware: if ( old_url.endswith('/') and not old_url.startswith("/admin") - and not old_url.startswith("/login") + and not old_url.startswith("/account") and not old_url.startswith("/api") and not old_url == "/" ):