Ad uchun api chiqarildi

This commit is contained in:
2025-11-28 16:49:38 +05:00
parent 94f129c446
commit 97e7098b9e
24 changed files with 600 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ from core.apps.api.models import AdModel
class AdOption(AbstractBaseModel):
name = models.CharField(_("Name"), max_length=255)
value = models.CharField(_("Value"), max_length=255)
ad = models.ForeignKey(AdModel, on_delete=models.CASCADE)
ad = models.ForeignKey(AdModel, on_delete=models.CASCADE, related_name="options", verbose_name=_("Ad"))
def __str__(self):
return str(self.pk)