1from django.utils.decorators import method_decorator
2from django.contrib.auth.decorators import login_required
3
4#AS example
5class ProfileView(View):
6 @method_decorator(login_required(login_url='login'))
7 def get(self, request):
8 .......