I need this inheritance:
Item(models.Model)
…
class Meta:
abstract = True
Food(Item)
…
Meal(Item)
items= models.ManyToManyField(Item,related_name=’meal_items’)
But I am getting this error:
AssertionError: ManyToManyField cannot define a relation with abstract class Item
What should I do? Any other option?
Multi-table inheritance? ManyToMany fields have to link actual database tables.