[Fixed]-Django admin and inlines: many-to-many with 'through' model – performance issue

1👍

Try override EngagementAdmin.get_queryset():

class EngagementAdmin(ChaosDefaultAdmin):
    def get_queryset(self, request):
        qs = super(EngagementAdmin, self).get_queryset(request)
        return qs.prefetch_related('additional_points_of_contact')
        # or 
        # return qs.prefetch_related('additional_points_of_contact__client_contact')

Leave a comment