Testlar qo'shildi

This commit is contained in:
2025-11-26 12:35:22 +05:00
parent bdc2fbe79b
commit f04130d769
8 changed files with 162 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ from django_core.models.base import AbstractBaseModel
from django.utils.translation import gettext_lazy as _
from django.contrib.auth import get_user_model
from core.apps.api.choices.ad_type import AdType, AdCategoryType
from model_bakery import baker
class AdModel(AbstractBaseModel):
@@ -18,6 +19,10 @@ class AdModel(AbstractBaseModel):
tags = models.ManyToManyField("api.Tags", verbose_name=_("Tags"))
image = models.ImageField(verbose_name=_("Image"))
@classmethod
def _baker(cls):
return baker.make(cls)
def __str__(self):
return str(self.pk)