def push(): with cd(env.deploy_folder): fab_django.deploy() fab_django.syncdb() fab_django.clean_pyc() fab_django.restart_app(env.app_name) fab_django.load_data_mio(env.fixtures_name) if env.nginx_serves_static: fab_nginx.restart() deploy_info()
def install_app(): """ install django app """ run("mkdir -p %s" % env.deploy_folder) fab_django.prepare_env(env.local_conf_folder, env.deploy_folder) update_conf() fab_django.copy_conf_files(env.local_conf_folder, \ env.deploy_folder, env.is_mobile) with cd(env.deploy_folder): fab_django.clean_pyc() fab_django.syncdb() fab_django.create_admin() fab_django.load_data(env.fixtures_name) fab_django.restart_app(env.app_name) if env.nginx_serves_static: fab_nginx.restart() else: fab_apache.restart()
def install_app(): """ install django app """ sudo("mkdir -p %s" % env.deploy_folder) sudo("chown -R %s %s" % (env.user, env.deploy_folder)) fab_django.prepare_env(env.local_conf_folder, env.deploy_folder) update_conf() fab_django.copy_conf_files(env.local_conf_folder, \ env.deploy_folder, env.is_mobile) with cd(env.deploy_folder): fab_django.clean_pyc() fab_django.syncdb() fab_django.create_admin() fab_django.load_data(env.fixtures_name) fab_supervisor.reload() fab_django.restart_app(env.app_name) if env.nginx_serves_static: fab_nginx.restart() else: fab_apache.restart()