class Boat(models.Model):
name = models.CharField(max_length=100)
quantity = models.DecimalField(max_digits=8, decimal_places=2)
fish_type = models.CharField(max_length=50, choices=FISH_TYPE)
class Load(models.Model):
boat = models.ForeignKey(Boat, on_delete=models.CASCADE)
delivery_date = models.DateTimeField(auto_now_add=True)
class OrderLoad(models.Model):
order = models.ForeignKey(Order, on_delete=models.CASCADE)
quantity = models.DecimalField(max_digits=8, decimal_places=2)
fish_type = models.CharField(max_length=50, choices=FISH_TYPE)
what I want to do is, when orderload instance created, it should reduce the quantity.