Given three models related by M2M fields:
A <-> B <-> C
models
class A(models.Model):
name = models.CharField()
class B(models.Model):
a = ManyToManyField(A)
class C(models.Model):
b = ManyToManyField(B)
With the following admin I have an Inline between A-B:
admin
class BInline(admin.TabularInline):
model = B.a.through
class AAdmin(admin.ModelAdmin):
inlines = [BInline,]
What I need now is to have another inline between A and C. But I don't know how to set the relation among them.
class CInline(admin.TabularInline):
model = #¿?
class AAdmin(admin.ModelAdmin):
inlines = [ BInline,
CInline,
]