我創建了以下型號:Django管理註冊多對多中間模型
class Child(models.Model):
some_var = models.CharField()
class Parent(models.Model):
m2m = models.ManyToManyField(Child)
的Django自動創建名爲ParentChild
背景的中介模式。現在,我想在Django Admin中註冊該中介模型。那可能嗎?如果是這樣,怎麼樣?或者它只適用於through="ThroughModel"
?
權,Django的如此規定https://docs.djangoproject.com/es/1.9/topics/db/models/#extra-fields-on-many-to-many-relationships和工作管理員https://docs.djangoproject.com/zh/dev/ref/contrib/admin/#working-with-many-to-many-intermediary-models –