def new_app(app, bench_path='.'): # For backwards compatibility app = app.lower().replace(" ", "_").replace("-", "_") logger.log('creating new app {}'.format(app)) apps = os.path.abspath(os.path.join(bench_path, 'apps')) bench.set_frappe_version(bench_path=bench_path) if bench.FRAPPE_VERSION == 4: exec_cmd("{frappe} --make_app {apps} {app}".format( frappe=get_frappe(bench_path=bench_path), apps=apps, app=app)) else: run_frappe_cmd('make-app', apps, app, bench_path=bench_path) install_app(app, bench_path=bench_path)
def old_frappe_cli(bench_path='.'): f = get_frappe(bench_path=bench_path) os.chdir(os.path.join(bench_path, 'sites')) os.execv(f, [f] + sys.argv[2:])
def old_frappe_cli(bench='.'): f = get_frappe(bench=bench) os.chdir(os.path.join(bench, 'sites')) os.execv(f, [f] + sys.argv[2:])