django_seed/seeder.py
def execute(self, using=None):
        """
        Populate the database using all the Entity classes previously added.

        :param using A Django database connection name
        :rtype: A list of the inserted PKs
        """
        if not using:
            using = self.get_connection()

        inserted_entities = {}
        while len(self.orders):
            order = self.orders.pop(0)
            number = order["quantity"]
            klass = order["klass"]
            entity = order["entity"]

            if klass not in inserted_entities:
                inserted_entities[klass] = []
            for i in range(0, number):
                executed_entity = entity.execute(using, inserted_entities)
                inserted_entities[klass].append(executed_entity)

        return inserted_entities

        Populate the database using all the Entity classes previously added.

        :param using A Django database connection name
        :rtype: A list of the inserted PKs
        
Populate the database using all the Entity classes previously added.
:param using A Django database connection name
:rtype: A list of the inserted PKs
Populate the database using all the Entity classes previously added . : param using A Django database connection name : rtype : A list of the inserted PKs
def execute(self, using=None):
        if not using:
            using = self.get_connection()
        inserted_entities = {}
        while len(self.orders):
            order = self.orders.pop(0)
            number = order["quantity"]
            klass = order["klass"]
            entity = order["entity"]
            if klass not in inserted_entities:
                inserted_entities[klass] = []
            for i in range(0, number):
                executed_entity = entity.execute(using, inserted_entities)
                inserted_entities[klass].append(executed_entity)
        return inserted_entities
def execute ( self , using = None ) : if not using : using = self . get_connection ( ) inserted_entities = { } while len ( self . orders ) : order = self . orders . pop ( 0 ) number = order [ "quantity" ] klass = order [ "klass" ] entity = order [ "entity" ] if klass not in inserted_entities : inserted_entities [ klass ] = [ ] for i in range ( 0 , number ) : executed_entity = entity . execute ( using , inserted_entities ) inserted_entities [ klass ] . append ( executed_entity ) return inserted_entities
Populate the database using all the Entity classes previously added.
Populate the database using all the Entity classes previously added .
"""
        Populate the database using all the Entity classes previously added.

        :param using A Django database connection name
        :rtype: A list of the inserted PKs
        """
self
using