

def addEntity(self, model, number, customFieldFormatters=None):
    '\n        Add an order for the generation of $number records for $entity.\n\n        :param model: mixed A Django Model classname, or a faker.orm.django.EntityPopulator instance\n        :type model: Model\n        :param number: int The number of entities to populate\n        :type number: integer\n        :param customFieldFormatters: optional dict with field as key and callable as value\n        :type customFieldFormatters: dict or None\n        '
    if (not isinstance(model, ModelPopulator)):
        model = ModelPopulator(model)
    model.fieldFormatters = model.guessFieldFormatters(self.generator)
    if customFieldFormatters:
        model.fieldFormatters.update(customFieldFormatters)
    klass = model.model
    self.entities[klass] = model
    self.quantities[klass] = number
    self.orders.append(klass)

dataset/ETHPy150Open joke2k/django-faker/django_faker/populator.py Populator.addEntity/original