瀏覽代碼

[Minor] Added '--admin-password' to by pass admin password prompt on reinstalling the site

version-14
shreyas 8 年之前
父節點
當前提交
649696fb93
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      frappe/commands/site.py

+ 3
- 2
frappe/commands/site.py 查看文件

@@ -110,9 +110,10 @@ def restore(context, sql_file_path, mariadb_root_username=None, mariadb_root_pas
os.remove(private)

@click.command('reinstall')
@click.option('--admin-password', help='Administrator Password for reinstalled site')
@click.option('--yes', is_flag=True, default=False, help='Pass --yes to skip confirmation')
@pass_context
def reinstall(context, yes=False):
def reinstall(context, admin_password=None, yes=False):
"Reinstall site ie. wipe all data and start over"

if not yes:
@@ -134,7 +135,7 @@ def reinstall(context, yes=False):

frappe.init(site=site)
_new_site(frappe.conf.db_name, site, verbose=context.verbose, force=True, reinstall=True,
install_apps=installed)
install_apps=installed, admin_password=admin_password)

@click.command('install-app')
@click.argument('app')


Loading…
取消
儲存