django_seed/seeder.py
def add_entity(self, model, number, customFieldFormatters=None):
        """
        Add an order for the generation of $number records for $entity.

        :param model: mixed A Django Model classname,
        or a faker.orm.django.EntitySeeder instance
        :type model: Model
        :param number: int The number of entities to seed
        :type number: integer
        :param customFieldFormatters: optional dict with field as key and
        callable as value
        :type customFieldFormatters: dict or None
        """
        
        # We always want to make a new ModelSeeder in case multiple unique
        # orders for a specific model are created before a single execute
        model = ModelSeeder(model)

        model.field_formatters = model.guess_field_formatters(self.faker)
        if customFieldFormatters:
            model.field_formatters.update(customFieldFormatters)

        order = {
            "klass": model.model,
            "quantity": number,
            "entity": model,
        }
        self.orders.append(order)

        Add an order for the generation of $number records for $entity.

        :param model: mixed A Django Model classname,
        or a faker.orm.django.EntitySeeder instance
        :type model: Model
        :param number: int The number of entities to seed
        :type number: integer
        :param customFieldFormatters: optional dict with field as key and
        callable as value
        :type customFieldFormatters: dict or None
        
Add an order for the generation of $number records for $entity.
Add an order for the generation of $number records for $entity .
def add_entity(self, model, number, customFieldFormatters=None):
        model = ModelSeeder(model)
        model.field_formatters = model.guess_field_formatters(self.faker)
        if customFieldFormatters:
            model.field_formatters.update(customFieldFormatters)
        order = {
            "klass": model.model,
            "quantity": number,
            "entity": model,
        }
        self.orders.append(order)
def add_entity ( self , model , number , customFieldFormatters = None ) : model = ModelSeeder ( model ) model . field_formatters = model . guess_field_formatters ( self . faker ) if customFieldFormatters : model . field_formatters . update ( customFieldFormatters ) order = { "klass" : model . model , "quantity" : number , "entity" : model , } self . orders . append ( order )
Add an order for the generation of $number records for $entity.
Add an order for the generation of $number records for $entity .
"""
        Add an order for the generation of $number records for $entity.

        :param model: mixed A Django Model classname,
        or a faker.orm.django.EntitySeeder instance
        :type model: Model
        :param number: int The number of entities to seed
        :type number: integer
        :param customFieldFormatters: optional dict with field as key and
        callable as value
        :type customFieldFormatters: dict or None
        """ # We always want to make a new ModelSeeder in case multiple unique # orders for a specific model are created before a single execute
self
model
mixed A Django Model classname,
or a faker.orm.django.EntitySeeder instance
mixed A Django Model classname or a faker . orm . django . EntitySeeder instance
number
int The number of entities to seed
int The number of entities to seed
customFieldFormatters
optional dict with field as key and
callable as value
optional dict with field as key and callable as value