# -*- coding: utf-8 -*-
# @File  : mixin.py
# @Author: clelandgt@163.com
# @Date  : 2020-07-05
# @Desc  :

from django.contrib.auth.decorators import login_required


class LoginRequiredMixin(object):
    @classmethod
    def as_view(cls, **initkwargs):
        # 调用父类的as_view
        view = super(LoginRequiredMixin, cls).as_view(**initkwargs)
        return login_required(view)
