def main(argv): """main function.""" heroku_app = None manage_py = script_utils.manage_py_command() manage_command = "python " + manage_py try: opts, args = getopt.getopt(argv, "r:h", ["heroku=", "help"]) except getopt.GetoptError: script_utils.exit_with_help(__doc__) for opt in opts: if opt[0] == "-h" or opt[0] == "--help": script_utils.exit_with_help(__doc__) if opt[0] == "-r" or opt[0] == "--heroku": heroku_app = opt[1] manage_command = "heroku run --app %s python makahiki/manage.py" % heroku_app _ = args if not heroku_app: script_utils.install_requirements() else: script_utils.push_to_heroku(heroku_app) script_utils.syncdb(manage_command) script_utils.copy_static_media(heroku_app)
def main(argv): """main function.""" heroku_app = None manage_command = "python manage.py" try: opts, args = getopt.getopt(argv, "r:h", ["heroku=", "help"]) except getopt.GetoptError: script_utils.exit_with_help(__doc__) for opt in opts: if opt[0] == "-h" or opt[0] == "--help": script_utils.exit_with_help(__doc__) if opt[0] == "-r" or opt[0] == "--heroku": heroku_app = opt[1] manage_command = "heroku run --app %s python makahiki/manage.py" % heroku_app _ = args if not heroku_app: script_utils.install_requirements() else: script_utils.push_to_heroku(heroku_app) script_utils.syncdb(manage_command) script_utils.copy_static_media(heroku_app)
def main(argv): """main function.""" instance_type = None heroku_app = None manage_py = script_utils.manage_py_command() manage_command = "python " + manage_py fixture_path = script_utils.manage_py_dir() + "fixtures" try: opts, args = getopt.getopt(argv, "t:r:h:d", ["type=", "heroku=", "help", "data"]) except getopt.GetoptError: script_utils.exit_with_help(__doc__) if not opts: script_utils.exit_with_help(__doc__) for opt in opts: if opt[0] == "-h" or opt[0] == "--help": script_utils.exit_with_help(__doc__) if opt[0] == "-t" or opt[0] == "--type": instance_type = opt[1] if opt[0] == "-r" or opt[0] == "--heroku": heroku_app = opt[1] manage_command = "heroku run --app %s python makahiki/manage.py" % heroku_app if opt[0] == "-d" or opt[0] == "--data": data_only = True if not instance_type in ("default", "demo", "test", "uh12"): script_utils.exit_with_help(__doc__) _ = args if not data_only: if not heroku_app: script_utils.install_requirements() else: script_utils.create_heroku_app(heroku_app) script_utils.push_to_heroku(heroku_app) script_utils.reset_db(heroku_app) script_utils.syncdb(manage_command) #script_utils.copy_static_media(heroku_app) script_utils.load_data(manage_command, instance_type, fixture_path) print "initialize_instance completed."
def main(argv): """main function.""" instance_type = None heroku_app = None manage_py = script_utils.manage_py_command() manage_command = "python " + manage_py fixture_path = "fixtures" try: opts, args = getopt.getopt(argv, "t:r:h", ["type=", "heroku=", "help"]) except getopt.GetoptError: script_utils.exit_with_help(__doc__) if not opts: script_utils.exit_with_help(__doc__) for opt in opts: if opt[0] == "-h" or opt[0] == "--help": script_utils.exit_with_help(__doc__) if opt[0] == "-t" or opt[0] == "--type": instance_type = opt[1] if opt[0] == "-r" or opt[0] == "--heroku": heroku_app = opt[1] manage_command = "heroku run --app %s python makahiki/manage.py" % heroku_app if not instance_type in ("default", "demo", "test", "uh12"): script_utils.exit_with_help(__doc__) _ = args if not heroku_app: script_utils.install_requirements() else: script_utils.create_heroku_app(heroku_app) script_utils.push_to_heroku(heroku_app) script_utils.reset_db(heroku_app) script_utils.syncdb(manage_command) script_utils.copy_static_media(heroku_app) script_utils.load_data(manage_command, instance_type, fixture_path)