本文介绍了formfield_for_foreignkey和Inline Admin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想在特定的灯具中显示与团队相关的玩家。通常当我这样做,它显示了我所有的玩家从数据库。这是我的models.py

I only want to show the players related to team in a particular fixture. Normally when I do it, it shows me all my players from the database. Here is my models.py

 c  c $ c> code>那里。

As a side note, the else clause is unnecessary if you're just going to pass there.

这篇关于formfield_for_foreignkey和Inline Admin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 13:20