

def make_factory(self, cls, count):
    ' Get the generators from the Scaffolding class within the model.\n        '
    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] = finalizer
            text.append(('%s: %s; ' % (field_name, fields[field_name])))
    try:
        self.stdout.write(('Generator for %s: %s\n' % (cls, ''.join(text))))
    except models.ObjectDoesNotExist:
        self.stdout.write(('Generator for %s\n' % ''.join(text)))
    if (hasattr(scaffold, 'finalize') and hasattr(scaffold.finalize, '__call__')):
        finalizer = scaffold.finalize
    return (fields, finalizer)

dataset/ETHPy150Open sbaechler/django-scaffolding/scaffolding/management/commands/scaffold.py Command.make_factory/VarMisuse@99/157 `generator`->`finalizer`