File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414@admin .register (EAPFile )
1515class EAPFileAdmin (admin .ModelAdmin ):
1616 search_fields = ("caption" ,)
17+ list_select_related = True
18+ autocomplete_fields = (
19+ "created_by" ,
20+ "modified_by" ,
21+ )
1722
1823
1924@admin .register (EAPRegistration )
Original file line number Diff line number Diff line change @@ -215,6 +215,8 @@ class MiniFullEAPSerializer(
215215):
216216 updated_checklist_file_details = EAPFileSerializer (source = "updated_checklist_file" , read_only = True )
217217 budget_file_details = EAPFileSerializer (source = "budget_file" , read_only = True )
218+ theory_of_change_table_file_details = EAPFileSerializer (source = "theory_of_change_table_file" , read_only = True )
219+ forecast_table_file_details = EAPFileSerializer (source = "forecast_table_file" , read_only = True )
218220
219221 class Meta :
220222 model = FullEAP
@@ -230,6 +232,8 @@ class Meta:
230232 "is_locked" ,
231233 "review_checklist_file" ,
232234 "updated_checklist_file_details" ,
235+ "theory_of_change_table_file_details" ,
236+ "forecast_table_file_details" ,
233237 "created_at" ,
234238 "modified_at" ,
235239 )
Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ def get_queryset(self) -> QuerySet[EAPRegistration]:
108108 )
109109 .prefetch_related (
110110 "partners" ,
111+ "users" ,
111112 Prefetch (
112113 "simplified_eaps" ,
113114 queryset = SimplifiedEAP .objects .select_related (
@@ -122,6 +123,12 @@ def get_queryset(self) -> QuerySet[EAPRegistration]:
122123 queryset = FullEAP .objects .select_related (
123124 "budget_file__created_by" ,
124125 "budget_file__modified_by" ,
126+ "updated_checklist_file__created_by" ,
127+ "updated_checklist_file__modified_by" ,
128+ "theory_of_change_table_file__created_by" ,
129+ "theory_of_change_table_file__modified_by" ,
130+ "forecast_table_file__created_by" ,
131+ "forecast_table_file__modified_by" ,
125132 ),
126133 ),
127134 )
You can’t perform that action at this time.
0 commit comments