def make_factory(self, cls, count):
field_names = cls._meta.get_all_field_names()<EOL>fields = {}<EOL>text = []<EOL>finalizer = None<EOL>scaffold = scaffolding.scaffold_for_model(cls)<EOL>for field_name in field_names:<EOL><INDENT>generator = getattr(scaffold, field_name, None)<EOL>if generator:<EOL><INDENT>if hasattr(generator, '<STR_LIT>'):<EOL><INDENT>generator.set_up(cls, count)<EOL><DEDENT>fields[field_name] = generator<EOL>text.append(u'<STR_LIT>' % (field_name, fields[field_name]))<EOL><DEDENT><DEDENT>try:<EOL><INDENT>self.stdout.write(u'<STR_LIT>' % (cls, u'<STR_LIT>'.join(text)))<EOL><DEDENT>except models.ObjectDoesNotExist:<EOL><INDENT>self.stdout.write(u'<STR_LIT>' % u'<STR_LIT>'.join(text))<EOL><DEDENT>if hasattr(scaffold, '<STR_LIT>') and hasattr(scaffold.finalize, '<STR_LIT>'):<EOL><INDENT>finalizer = scaffold.finalize<EOL><DEDENT>return fields, finalizer<EOL>
Get the generators from the Scaffolding class within the model.