0
我有以下領域的飼料模型:通過項目列表循環,從而得到他們的外鍵的值
class Feed(models.Model)
authority=models.ForeignKey(Authority,blank=True,null=True)
我有權威的查詢集名爲followed_authority
中,我想從每個相應的飼料在followed_authority
管理局對我來說,明顯的一點就是通過followed_authority
使用for
循環,我認爲它效率低下,因爲在following_authority
的instanaces及其相應的飼料都非常large.Kindly幫我出
謝謝..作品像一個湛 –