def set_up_sample_bom_files(number): while number: number -= 1 bom = BomFile( name=name.first_name(), comment=lorem_ipsum.paragraph(sentences_quantity=3) ) db.session.add(bom) db.session.commit()
def generate_post(func_author): return Post(title=lorem_ipsum.title(), body=lorem_ipsum.paragraph(), created=date.date(), author=func_author())
def generate_comment(func_author, func_post): return Comment(body=lorem_ipsum.paragraph(), created=date.date(past=True), author=func_author(), post=func_post())