set the login redirect URL in Django

| Tag python  django  auth 

Set LOGIN_REDIRECT_URL in settings.py, default is /accounts/profile.

The value can be he URL or named URL pattern where requests are redirected after login when the LoginView doesn’t get a next GET parameter.

Similar settings are:

  • LOGOUT_REDIRECT_URL
  • LOGIN_URL

Prev     Next