Beispiel #1
0
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()
Beispiel #2
0
 def generate_post(func_author):
     return Post(title=lorem_ipsum.title(),
                 body=lorem_ipsum.paragraph(),
                 created=date.date(),
                 author=func_author())
Beispiel #3
0
 def generate_comment(func_author, func_post):
     return Comment(body=lorem_ipsum.paragraph(),
                    created=date.date(past=True),
                    author=func_author(),
                    post=func_post())