LOGIN_REDIRECT_URL appends the url to login url

My LOGIN_REDIRECT_URL or the redirect_field_name in my app’s urls.py while using views.LoginView.as_view(redirect_field_name="name") appends the redirect url to the original login url. For example, login url is user/login, and redirect_url is user/home, when I login, it becomes user/login/user/home.

You specified the redirect as relative rather than absolute - it should be /user/home.

1 Like