예제 #1
0
 def _inner(request, *args, **kwargs):
     if is_request_banned(request):
         return direct_to_template(request, 'ip_ban/banned.html')
     return func(request, *args, **kwargs)
예제 #2
0
 def allow(self, comment, content_object, request):
 	return not is_request_banned(request)
예제 #3
0
 def allow(self, comment, content_object, request):
     return not is_request_banned(request)
예제 #4
0
	def process_request(self, request):
		request.is_banned = is_request_banned(request)
		return None
예제 #5
0
	def _inner(request, *args,**kwargs):
		if is_request_banned(request):
			return direct_to_template(request, 'ip_ban/banned.html')
		return func(request, *args, **kwargs)