def forge(tag, post, comment): click.echo('Generating %d tags...' % tag) fake_tags(tag) click.echo('Generating %d posts...' % post) fake_posts(post) click.echo('Generating %d comments...' % comment) fake_comments(comment) click.echo('Done.')
def forge(category, post): """Generate fake data.""" from app.fakes import fake_admin, fake_categories, fake_posts db.drop_all() db.create_all() click.echo('Generating the administrator...') fake_admin() click.echo('Generating %d categories...' % category) fake_categories(category) click.echo('Generating %d posts...' % post) fake_posts(post) click.echo('Done.')
def forge(count): """Generate fake posts for every user.""" from app.fakes import fake_users, fake_categories, fake_posts, fake_comments click.echo('Generating user...') fake_users(count) click.echo('Generating category...') fake_categories(count) click.echo('Generating post...') fake_posts(count) click.echo('Generating comment...') fake_comments(count) click.echo('Completed')
def forge(category,post,comment): """Generates the fake categories, posts, and comments.""" from app.fakes import fake_admin,fake_bloginfo,fake_categories,fake_posts,fake_comments click.echo('生成管理员。。。') fake_admin() click.echo('生成博客信息。。。') fake_bloginfo() click.echo('Generating %d categories...' % category) fake_categories(category) click.echo('Generating %d posts...' % post) fake_posts(post) click.echo('Generating %d comments...' % comment) fake_comments(comment) click.echo('Done.')
def forge(category, post, tag): """Generate fake data.""" from app.fakes import fake_categories, fake_posts, fake_tags db.drop_all() db.create_all() click.echo('Generating %d categories...' % category) fake_categories(category) click.echo('Generating %d tags...' % tag) fake_tags(tag) click.echo('Generating %d posts...' % post) fake_posts(post) click.echo('Done.')
def forge(category, post, comment): """Generates the fake the categories, posts and comments.""" from app.fakes import fake_admin, fake_categories, fake_posts, fake_comments db.drop_all() db.create_all() click.echo('Generating the administrator...') fake_admin() click.echo('Generating %d of categoies... ' % category) fake_categories(category) click.echo('Generating %d of posts... ' % post) fake_posts(post) click.echo('Generating %d of comments... ' % comment) fake_comments(comment) click.echo('Done')
def forge(category, post, comment): """Generate fake data.""" from app.fakes import fake_admin, fake_categories, fake_posts, fake_links, fake_comments db.drop_all() db.create_all() click.echo('Generating the administrator...') fake_admin() click.echo('Generating {} categories...'.format(category)) fake_categories(category) click.echo('Generating {} posts...'.format(post)) fake_posts(post) click.echo('Generating links...') fake_links() click.echo('Generating {} comments...'.format(comment)) fake_comments(comment) click.echo('Done.')