Commits

sirex committed 23fa68b

Also accept list

Comments (0)

Files changed (1)

annoying/decorators.py

     """
     @wraps(func)
     def wrapper(request, *args, **kwargs):
-        if not request.is_ajax():
-            return HttpResponseBadRequest
         response = func(request, *args, **kwargs)
-        if isinstance(response, dict):
+        if isinstance(response, (dict, list)):
             return JsonResponse(response)
         else:
             return response