Example #1
0
 def json_response(self, status=500):
     json_error_response = JsonResponse(self.dict(), status=status)
     if status >= 500:
         # skip django reports for 5xx responses
         json_error_response._has_been_logged = True
     return json_error_response