diff --git a/mobile_api/views/events.py b/mobile_api/views/events.py index 27ada07..d795e7f 100644 --- a/mobile_api/views/events.py +++ b/mobile_api/views/events.py @@ -390,9 +390,9 @@ class FeaturedEventsAPI(APIView): data_dict['thumb_img'] = '' event_list.append(data_dict) - return JsonResponse({status: success, events: event_list}) + return JsonResponse({"status": "success", "events": event_list}) except Exception as e: - return JsonResponse({status: error, message: str(e)}) + return JsonResponse({"status": "error", "message": str(e)}) @method_decorator(csrf_exempt, name='dispatch') @@ -416,6 +416,6 @@ class TopEventsAPI(APIView): data_dict['thumb_img'] = '' event_list.append(data_dict) - return JsonResponse({status: success, events: event_list}) + return JsonResponse({"status": "success", "events": event_list}) except Exception as e: - return JsonResponse({status: error, message: str(e)}) + return JsonResponse({"status": "error", "message": str(e)})