Django Signals to update a different model
问题 Say I have two models: class Product(models.Model): product = model.CharField() quantity = model.IntegerField() class sale(models.Model) product = models.ManyToManyField(Product) number_sold = model. IntegerField() When a sale is made, I'd like the product quantity to be updated. Are signals the best way of going about this? I was thinking about having sale admit a post_save signal when an object is created or updated. If updated, I would have to know the old and the new values to adjust the