12 lines
432 B
Django/Jinja
12 lines
432 B
Django/Jinja
from faker import Faker
|
|
from polyfactory.factories.pydantic_factory import ModelFactory
|
|
|
|
from learn_sql_model.factories.pet import PetFactory
|
|
from learn_sql_model.models.{{ modelname }} import {{ modelname }}
|
|
from learn_sql_model.models.pet import Pet
|
|
|
|
|
|
class {{ modelname }}Factory(ModelFactory[{{ modelname }}]):
|
|
__model__ = {{ modelname }}
|
|
__faker__ = Faker(locale="en_US")
|
|
__set_as_default_factory_for_type__ = True
|