i work on Django 2.1.2 and i wanted decorated my view base on class. I apply login_required decorator in path
path('', login_required(CredentialsList.as_view()), name='credentials-list'),
when i send request to CredentialList it responds normally, it does not redirect me to the login screen. whether I omitted something from the configuration
LOGIN_URL='login/'
LOGIN_REDIRECT_URL = 'list/'
Instead you can use the LoginRequiredMixin or the decorator in your view. For example:
and for your url remove the decorator: