I\'m working on a API for a project and I have a relationship Order/Products through OrderProducts like this:
In models.py
class Product(models.Model
Since you needed the manytomany field only for listing, a better solution is to add readonly=True on OrderResource's products field. This removes the need of overriding save_m2m method. For completeness:
class OrderResource(ModelResource):
products = fields.ToManyField('order.api.ProductResource', products,
readonly=True, full=True)
class Meta:
queryset = Order.objects.all()
resource_name = 'order'