def init():
        """Initialize Albumy."""
        click.echo('Initializing the database...')
        db.create_all()

        click.echo('Initializing the roles and permissions...')
        Role.init_role()

        click.echo('Done.')
 def initdb(drop):
     """Initialize the database."""
     if drop:
         click.confirm(
             'This operation will delete the database, do you want to continue?',
             abort=True)
         db.drop_all()
         click.echo('Drop tables.')
     db.create_all()
     click.echo('Initialized database.')
    def forge():
        """Generate dict."""
        db.drop_all()
        db.create_all()

        Role.init_role()
        click.echo('Initialized the roles and permissions...')
        AEDict.init_aedict()
        click.echo('Initialized ae dict.')
        StatusDict.init_statusdict()
        click.echo('Initialized status dict.')
Beispiel #4
0
    def init():
        """Initialize dict."""
        click.echo('Initializing the database...')
        db.create_all()

        click.echo('Initializing the roles and permissions...')
        Role.init_role()

        AEDict.init_aedict()
        click.echo('Initialized ae dict.')
        StatusDict.init_statusdict()
        click.echo('Initialized status dict.')
        click.echo('Done.')