堆栈上的各种其他帖子都研究了如何在list_display中“适当地”包含外键,从而支持排序等。A few special cases to note about list_display:
If the field is a ForeignKey, Django will我之前已经让它工作了,但是自从我最后一次检查django a
正在做一个django项目,并试图加快调用速度。我注意到Django自动执行第二个查询来评估任何外键关系。it be 1 cause it is the first entryaddress1.objects.filter(person_id = "1")查询#1:从address中选择address.id,address.person_id
查询#2:从person中选择p