def _inner(request, *args, **kwargs): if is_request_banned(request): return direct_to_template(request, 'ip_ban/banned.html') return func(request, *args, **kwargs)
def allow(self, comment, content_object, request): return not is_request_banned(request)
def process_request(self, request): request.is_banned = is_request_banned(request) return None
def _inner(request, *args,**kwargs): if is_request_banned(request): return direct_to_template(request, 'ip_ban/banned.html') return func(request, *args, **kwargs)