From e900ce0d0d2653bef504812842192f60621722d1 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sat, 20 Apr 2019 19:25:24 +0200 Subject: [PATCH] Fix login screen not being redirected --- re2o/urls.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/re2o/urls.py b/re2o/urls.py index 9c13965b..37497572 100644 --- a/re2o/urls.py +++ b/re2o/urls.py @@ -62,9 +62,7 @@ urlpatterns = [ url(r'^$', index, name='index'), url(r'^about/$', about_page, name='about'), url(r'^contact/$', contact_page, name='contact'), - url('^', include('django.contrib.auth.urls')), url(r'^i18n/', include('django.conf.urls.i18n')), - url(r'^admin/', include(admin.site.urls)), url(r'^users/', include('users.urls', namespace='users')), url(r'^search/', include('search.urls', namespace='search')), url( @@ -79,8 +77,11 @@ urlpatterns = [ include('preferences.urls', namespace='preferences') ), + # Include contrib auth and contrib admin # manage/login/ is redirected to the non-admin login page - url(r'^manage/login/$', RedirectView.as_view(pattern_name='login')), + url(r'^', include('django.contrib.auth.urls')), + url(r'^admin/login/$', RedirectView.as_view(pattern_name='login')), + url(r'^admin/', include(admin.site.urls)), ] # Add debug_toolbar URLs if activated if 'debug_toolbar' in settings.INSTALLED_APPS: