1👍
just add this to your settings.py
LOGIN_URL = 'login'
From Django Docs:
The URL or named URL pattern where requests are redirected for login when using the login_required() decorator…
see: https://docs.djangoproject.com/en/4.1/ref/settings/#login-url
0👍
because you have used this in urls.py
path('login/', CustomLoginView.as_view(), name='login')
just remove this url it will be fixed
use this for admin login
path('admin/', admin.site.urls)
- [Answered ]-Question about django model API
- [Answered ]-How to get latest value of a field on a related model in Django?
- [Answered ]-MPTT order DESC
- [Answered ]-How to get all my data from model to JSON? I need export and import my data
Source:stackexchange.com