There are such models:
class Item(models.Model): kind = models.ForeignKey(Kind, verbose_name="Тип предмета") price = models.IntegerField(default=0) class BuildingRequiredItem(models.Model): building = models.ForeignKey('Building', related_name="fk_required_items") item = models.ForeignKey(Item) count = models.IntegerField(default=0) class Building(Item): width = models.IntegerField() height = models.IntegerField() required_items = models.ManyToManyField(Item, through=BuildingRequiredItem, related_name='buildings_required', blank=True, null=True)
Please tell me how you can do the following thing: I want to be able to add, delete, edit the list of required items for this building when editing the building parameters (pay attention to through, there is an extra field - count). I suspect that inline formsets can be used here somehow, but something doesn't work.
InlineModelAdmin
tried? - neoascetic