我想显示一个公司的标题和产品下面的相关公司。我是新来的django,我不完全理解这一点。request): 'categories': Company.objects.all()return render(request, 'product_list.html', context) {% for category in categories %}
<h2>{{ c
堆栈上的各种其他帖子都研究了如何在list_display中“适当地”包含外键,从而支持排序等。A few special cases to note about list_display:
If the field is a ForeignKey, Django will我之前已经让它工作了,但是自从我最后一次检查django a