def make_factory(self, cls, count):
        field_names = cls._meta.get_all_field_names()
        fields = {}
        text = []
        finalizer = None
        scaffold = scaffolding.scaffold_for_model(cls)

        for field_name in field_names:
            generator = getattr(scaffold, field_name, None)
            if generator:
                if hasattr(generator, 'set_up'):
                    generator.set_up(cls, count)
                fields[field_name] = generator
                text.append(u'%s: %s; ' % (field_name, fields[field_name]))
        try:
            self.stdout.write(u'Generator for %s: %s\n' % (cls, u''.join(text)))
        except models.ObjectDoesNotExist:
            self.stdout.write(u'Generator for %s\n' % u''.join(text))

        if hasattr(scaffold, 'finalize') and hasattr(scaffold.finalize, '__call__'):
            finalizer = scaffold.finalize

        return fields, finalizer
Get the generators from the Scaffolding class within the model.
dataset/ETHPy150Open sbaechler/django-scaffolding/scaffolding/management/commands/scaffold.py/Command.make_factory