Skip to content

Commit

Permalink
Redirect login to accounts/login (#4337)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasciput authored Oct 30, 2024
1 parent dbe1a3e commit bf7a2ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bims/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# coding=utf-8

from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.urls import reverse_lazy, path, include, re_path
from django.views.generic import RedirectView
from django.views.generic import TemplateView
Expand Down Expand Up @@ -102,6 +103,10 @@
UserBoundaryUploadView
)


def login_redirect(request):
return redirect('/accounts/login', permanent=True)

urlpatterns = [
re_path(r'^$', landing_page_view, name='landing-page'),
re_path(r'^map/$', MapPageView.as_view(), name='map-page'),
Expand Down Expand Up @@ -311,6 +316,7 @@
path('context-layers/',
ContextLayersView.as_view(),
name='context-layers-view'),
re_path(r'^login/?$', login_redirect, name='login_redirect'),
]

# Api urls
Expand Down

0 comments on commit bf7a2ef

Please sign in to comment.