delete mathod qoshildi

This commit is contained in:
Husanjonazamov
2026-03-31 14:00:42 +05:00
parent 6f279fcb7d
commit cf23a61b98
6 changed files with 54 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ class ProductsModel(AbstractBaseModel):
related_name="products",
on_delete=models.CASCADE,
)
description = models.TextField(verbose_name=_("description"), null=True, blank=True)
def __str__(self):
return self.name
@@ -41,6 +42,7 @@ class SubProductModel(AbstractBaseModel):
name = models.CharField(verbose_name=_("name"), max_length=255)
price = models.DecimalField(verbose_name=_("price"), max_digits=10, decimal_places=2, default=0.0)
image = models.ImageField(verbose_name=_("image"), upload_to="subproducts/", null=True, blank=True)
description = models.TextField(verbose_name=_("description"), null=True, blank=True)
def __str__(self):
return f"{self.product.name} - {self.name}"