From f436de0a73965103d952b7ebdf7e310b0b396665 Mon Sep 17 00:00:00 2001 From: Vivek P Prakash Date: Mon, 1 Dec 2025 05:34:11 +0530 Subject: [PATCH] Updates for the event images --- .idea/workspace.xml | 41 +++++++++++++++++----------------- mobile_web_api/views/events.py | 7 ++++-- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 309dbc9..fafeecd 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,9 @@ - + + + - - @@ -711,16 +712,6 @@ - - - - - - - - - - @@ -741,6 +732,16 @@ + + + + + + + + + + @@ -753,8 +754,8 @@ - - + + diff --git a/mobile_web_api/views/events.py b/mobile_web_api/views/events.py index da7c245..69526b5 100644 --- a/mobile_web_api/views/events.py +++ b/mobile_web_api/views/events.py @@ -134,10 +134,13 @@ class EventDetailAPI(APIView): ) events = Event.objects.get(id=event_id) - thumb_img = EventImages.objects.get(id=event_id, is_primary=True) + event_images = EventImages.objects.filter(event=event_id) data = model_to_dict(events) data["status"] = "success" - data["thumb_img"] = request.build_absolute_uri(thumb_img.event_image.url) + event_images_list = [] + for ei in event_images: + event_images_list.append(request.build_absolute_uri(ei.event_image.url)) + data["images"] = event_images_list return JsonResponse(data)