import yangilandi

This commit is contained in:
Husanjonazamov
2026-03-27 20:32:39 +05:00
parent d80b57f6d3
commit 1ee818e625
4 changed files with 55 additions and 43 deletions

View File

@@ -63,9 +63,10 @@ class SubcategoryModel(AbstractBaseModel):
on_delete=models.CASCADE,
)
name = models.CharField(verbose_name=_("name"), max_length=255)
image = models.ImageField(verbose_name=_("image"), upload_to="subcategories/", null=True, blank=True)
def __str__(self):
return self.name
return f"{self.category.name} -> {self.name}"
@classmethod
def _baker(cls):