📅  最后修改于: 2022-03-11 14:47:24.098000             🧑  作者: Mango
from django.contrib import admin
class MyModelAdmin(admin.ModelAdmin):
def get_queryset(self, request):
queryset = super(MyModelAdmin, self).get_queryset(request)
queryset = queryset.prefetch_related('user')
return queryset