Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CommonCarInfo(CommonInfo):
- car = models.ForeignKey('main.Car', on_delete=models.SET_NULL, null=True)
- supplier = models.ForeignKey('supplier.Supplier', on_delete=models.SET_NULL, null=True)
- price = models.DecimalField(decimal_places=2, max_digits=10,
- validators=[MinValueValidator(limit_value=1.00)], null=True)
- class Meta:
- abstract = True
- class AutohouseCar(CommonCarInfo):
- autohouse = models.ForeignKey(Autohouse, on_delete=models.SET_NULL, null=True)
- amount = models.PositiveSmallIntegerField(default=1)
- Пытаюсь достучаться до car
Advertisement
Add Comment
Please, Sign In to add comment