0👍
In default, @login_required
will redirect the unauthenticated user to settings.LOGIN_URL
.
settings.LOGIN_URL
set as /accounts/login
as default. See the documentation.
Therefore, your login url is /login
, then you need to set the LOGIN_URL
in setting.py file.
Add this line in the end of setting.py
LOGIN_URL = "/login"
Also, you may want to have a look at the LOGIN_REDIRECT_URL
attribute.
- [Answered ]-How can I put XML in a HTML template? python/Django
- [Answered ]-Django doesn't use pyodbc as python does
Source:stackexchange.com