예제 #1
0
        def wrapper(request, *args, **kwargs):
            if authenticate and not request.user.is_authenticated():
                has_auth = False
                res = iter([])
            else:
                has_auth = True
                res = func(request, *args, **kwargs)

            response = SniperResponse(request, res, has_auth)
            return response.to_ajax_response()
예제 #2
0
 def wrapper(request, *args, **kwargs):
   if authenticate and not request.user.is_authenticated():
     has_auth = False
     res = iter([])
   else:
     has_auth = True
     res = func(request, *args, **kwargs)
   
   response = SniperResponse(request, res, has_auth)
   return response.to_ajax_response()
예제 #3
0
 def wrapper(request, *args, **kwargs):
     has_auth = True
     res = func(request, *args, **kwargs)
     response = SniperResponse(request, res, has_auth)
     return response.to_template_response()
예제 #4
0
 def wrapper(request, *args, **kwargs):
   has_auth = True
   res = func(request, *args, **kwargs)
   response = SniperResponse(request, res, has_auth)
   return response.to_template_response()