我为玩家team1player
和team2player
有2个栏位,而且我有赢家和输家栏位,我想用team1player
场或team2player
来填充赢家和输家栏位字段
我可以用最短的方法吗?还是我应该再写一次这样的代码。 winner=models.ManyToManyField(Player,related_name='winner')
team1player=models.ManyToManyField(Player,related_name='team1player')
team2player=models.ManyToManyField(Player,related_name='team2player')
winner=models.ManyToManyField(select team1player or team2player)
loser=models.ManyToManyField(select team1player or team2player)