1👍
Delete ‘def check_access():’ and Change decorate function to check_access.
And move ‘self’ argument.
in View Function
class DetailsView(View):
@check_access
def get(request): # Delete Self
....
in decorator
def check_access(view_function):
def wrap(self, request, *args, **kwargs): # add self
...
return wrap
referenced site : Decorator
Source:stackexchange.com