コード例 #1
0
ファイル: manage.py プロジェクト: erichilarysmithsr/dhbox
def build_database():
    """Builds website database and adds admin."""
    if not os.path.exists('dhbox-docker.db'):
        dhbox.db.create_all()
        dhbox.create_user_and_role()
    else:
        print "Database exists."
コード例 #2
0
ファイル: manage.py プロジェクト: erichilarysmithsr/dhbox
def build_database():
    """Builds website database and adds admin."""
    if not os.path.exists('dhbox-docker.db'):
        dhbox.db.create_all()
        dhbox.create_user_and_role()
    else:
        print "Database exists."
コード例 #3
0
def replace_admin_dhbox_image():
    """Updates admin's DH Box to the new seed image."""
    kill_and_remove_user('admin', user=False)
    dhbox.create_user_and_role()