def forge(user, follow, photo, tag, collect, comment): """Generate fake data.""" from vshaurme.fakes import fake_admin, fake_comment, fake_follow, fake_photo, fake_tag, fake_user, fake_collect db.drop_all() db.create_all() click.echo('Initializing the roles and permissions...') Role.init_role() click.echo('Generating the administrator...') fake_admin() click.echo('Generating %d users...' % user) fake_user(user) click.echo('Generating %d follows...' % follow) fake_follow(follow) click.echo('Generating %d tags...' % tag) fake_tag(tag) click.echo('Generating %d photos...' % photo) fake_photo(photo) click.echo('Generating %d collects...' % photo) fake_collect(collect) click.echo('Generating %d comments...' % comment) fake_comment(comment) click.echo('Done.')
def addphotos(photo, period, collect, comment): """Generate fake photos.""" from vshaurme.fakes import fake_comment, fake_photo, fake_tag, fake_collect click.echo('Generating %d photos...' % photo) fake_photo(photo, period) click.echo('Generating %d collects...' % collect) fake_collect(collect, period) click.echo('Generating %d comments...' % comment) fake_comment(comment, period) click.echo('Done.')