def populate(self, blueprint, documents):
<EOL>documents = self.finish(blueprint, documents)<EOL>frames = []<EOL>for document in documents:<EOL><INDENT>meta_document = {}<EOL>for field_name in blueprint._meta_fields:<EOL><INDENT>meta_document[field_name] = document[field_name]<EOL>document.pop(field_name)<EOL><DEDENT>frame = blueprint.get_frame_cls()(document)<EOL>for key, value in meta_document.items():<EOL><INDENT>setattr(frame, key, value)<EOL><DEDENT>frames.append(frame)<EOL><DEDENT>blueprint.on_fake(frames)<EOL>frames = blueprint.get_frame_cls().insert_many(frames)<EOL>blueprint.on_faked(frames)<EOL>return frames<EOL>
Populate the database with documents