File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def get_all_nested_data(self):
4040 to_attr = "_prefetched_active_call_for_presentation_schedules" ,
4141 ),
4242 )
43- .select_related ("image" )
43+ .select_related ("image" , "type__event__logo" )
4444 )
4545
4646
Original file line number Diff line number Diff line change 33 Presentation ,
44 PresentationCategory ,
55 PresentationSpeaker ,
6+ PresentationType ,
67 RoomSchedule ,
78)
9+ from event .serializers import EventSerializer
810from rest_framework import serializers
911
1012
13+ class PresentationTypeSerializer (serializers .ModelSerializer ):
14+ event = EventSerializer (read_only = True )
15+
16+ class Meta :
17+ model = PresentationType
18+ fields = ("id" , "name" , "event" )
19+
20+
1121class PresentationCategorySerializer (serializers .ModelSerializer ):
1222 class Meta :
1323 model = PresentationCategory
@@ -40,6 +50,7 @@ class Meta:
4050
4151
4252class PresentationSerializer (serializers .ModelSerializer ):
53+ presentation_type = PresentationTypeSerializer (source = "type" , read_only = True )
4354 image = serializers .FileField (source = "image.file" , read_only = True , allow_null = True )
4455 categories = PresentationCategorySerializer (many = True , read_only = True , source = "active_categories" )
4556 speakers = PresentationSpeakerSerializer (many = True , read_only = True , source = "active_speakers" )
@@ -51,6 +62,7 @@ class Meta:
5162 model = Presentation
5263 fields = (
5364 "id" ,
65+ "presentation_type" ,
5466 "title" ,
5567 "summary" ,
5668 "description" ,
You can’t perform that action at this time.
0 commit comments