1from django.contrib.auth.mixins import LoginRequiredMixin
2
3LOGIN_URL = 'your_url'
1from django.contrib.auth.mixins import LoginRequiredMixin
2
3class MyView(LoginRequiredMixin, View):
4 login_url = '/login/'
5 redirect_field_name = 'redirect_to'
6