class OrderItem(models.Model):
order = models.ForeignKey('Order', related_name='items')
product = models.ForeignKey('Product', related_name='order_items')
price = models.DecimalField(max_digits=10, decimal_places=2)
quantity = models.PositiveIntegerField(default=1)
help missing 1 required positional argument = 'on_delete'
Aucun commentaire:
Enregistrer un commentaire