def save_sql_settings(): global config update_sql_settings() write_sql_connection_settings(config) reload_sql_settings() save_sql_settings_button.button_type = 'success' save_sql_settings_button.label = 'Save'
def initialize_default_sql_connection_config_file(): # Create default sql connection config file sql_connection_path = get_settings('sql') if not os.path.isfile(sql_connection_path): write_sql_connection_settings({ 'host': 'localhost', 'dbname': 'dvh', 'port': '5432' })
def initialize_default_sql_connection_config_file(): # Create default sql connection config file sql_connection_path = os.path.join(script_dir, "preferences/sql_connection.cnf") if not os.path.isfile(sql_connection_path): write_sql_connection_settings({ 'host': 'localhost', 'dbname': 'dvh', 'port': '5432' })
def initialize_default_sql_connection_config_file(): # Create default sql connection config file sql_connection_path = get_settings('sql') print(sql_connection_path) if not os.path.isfile(sql_connection_path): if os.path.isfile('/this_is_running_in_docker'): write_sql_connection_settings({ 'host': 'docker.for.mac.localhost', 'user': '******', 'dbname': 'postgres', 'port': '5432' }) else: write_sql_connection_settings({ 'host': 'localhost', 'dbname': 'dvh', 'port': '5432' })
def set_sql_connection_parameters(): config = get_sql_connection_parameters_from_user() write_sql_connection_settings(config)