Переглянути джерело

[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) os.remove(private)


@click.command('reinstall') @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') @click.option('--yes', is_flag=True, default=False, help='Pass --yes to skip confirmation')
@pass_context @pass_context
def reinstall(context, yes=False):
def reinstall(context, admin_password=None, yes=False):
"Reinstall site ie. wipe all data and start over" "Reinstall site ie. wipe all data and start over"


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


frappe.init(site=site) frappe.init(site=site)
_new_site(frappe.conf.db_name, site, verbose=context.verbose, force=True, reinstall=True, _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.command('install-app')
@click.argument('app') @click.argument('app')


Завантаження…
Відмінити
Зберегти