8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 11:23:10 +00:00

Redirect Django Contrib Admin login page

Without this patch, Re2o has two login screen with different
features.

This patch redirects `/admin/login/` to the login page.

This patch is part of the Aube patchset for Re2o. This helps in the goal
to unify the login process and drop the custom login page.
This commit is contained in:
Alexandre Iooss 2019-04-15 09:37:33 +02:00 committed by klafyvel
parent f4c9ac19cf
commit 58196cadad

View file

@ -47,6 +47,7 @@ from django.conf import settings
from django.conf.urls import include, url from django.conf.urls import include, url
from django.contrib import admin from django.contrib import admin
from django.contrib.auth import views as auth_views from django.contrib.auth import views as auth_views
from django.views.generic import RedirectView
from .views import index, about_page, contact_page from .views import index, about_page, contact_page
@ -74,6 +75,9 @@ urlpatterns = [
r'^preferences/', r'^preferences/',
include('preferences.urls', namespace='preferences') include('preferences.urls', namespace='preferences')
), ),
# manage/login/ is redirected to the non-admin login page
url(r'^manage/login/$', RedirectView.as_view(pattern_name='login')),
] ]
# Add debug_toolbar URLs if activated # Add debug_toolbar URLs if activated
if 'debug_toolbar' in settings.INSTALLED_APPS: if 'debug_toolbar' in settings.INSTALLED_APPS: