我所有的 ManyToMany 都显示在我的管理表单中,除了使用时的自定义表单through
;
原始模型字段
class Action(models.Model):
combo_action = models.ForeignKey('Action', related_name = '+', blank = True, null = True, through = 'Action_Effects')
combo_bonus_effects = models.ManyToManyField('Effect', related_name = 'ComboInflicted', through = 'Action_Combo_Effects')
参考模型
class Action_Effects(models.Model):
action = models.ForeignKey('Action')
effect = models.ForeignKey('Effect')
duration = models.IntegerField(blank = True, null = True)
combo_potency = models.IntegerField(blank = True, null = True)
class Action_Combo_Effects(models.Model):
action = models.ForeignKey('Action')
effect = models.ForeignKey('Effect')
duration = models.IntegerField(blank = True, null = True)
combo_potency = models.IntegerField(blank = True, null = True)
我仍然找不到显示这些的方法。