def chcke(maker=0)
def check_login(func):
@wraps(func)
def jurisdiction(request, *args, **kwargs):
if maker==0:
pass
else:
pass
return jurisdiction
return check_login
我有上面一种装饰器,需要用它来装饰下面的类中的get函数,请问该如何实现
class login(View):
def get(request,*args,**kwargs):
pass
return None
def post(request,*args,**kwargs):
pass
return None