Search code examples
pythondjangodjango-urlsdjango-settings

Django LOGIN_REDIRECT_URL changes does not affect behavior


The login redirect URL was set to the dashboard since now when I have tried to change it to all-records. I have noticed that no matter what URL I put there, it will redirect to the dashboard. Even if I delete the line it redirects to dashboard. I am using Django debug toolbar and the settings file is saved and updated correctly. How do I fix this?

settings.py

LOGIN_REDIRECT_URL = 'all-records'

app/urls.py

from django.urls import path

from . import views

urlpatterns = [
    path('dashboard/', views.DashboardView.as_view(), name='dashboard'),
    path('all-records/<str:filter>',
         views.TbEntranceRightListView.as_view(), name='all-records'),
   
]

Solution

  • You just forget place /Some/:

    LOGIN_REDIRECT_URL = '/all-records/'