Exemple #1
0
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.')
Exemple #2
0
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.')
Exemple #3
0
    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')
Exemple #4
0
    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.')
Exemple #5
0
    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.')
Exemple #6
0
    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')
Exemple #7
0
    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.')