コード例 #1
0
def db_config_part():
    """
        step 1: we configre database connection
    """
    db_config_info = db_configurator.get_db_config_info()
    # print (db_config_info);
    host = db_config_info['host']
    user = db_config_info['user']
    password = db_config_info['password']
    database = db_config_info['database']

    conn_ins = db_controller.set_connection_instance_global(
        host, user, password, database)
    return conn_ins
コード例 #2
0
ファイル: test_run.py プロジェクト: changliukean/KEAN_chang
def db_config_part(django_connection_dict):
    """
        step 1: we configre database connection
    """

    host = django_connection_dict['HOST']
    user = django_connection_dict['USER']
    password = django_connection_dict['PASSWORD']
    database = django_connection_dict['NAME']

    # db_controller.set_connection_instance_global(host,user,password,database);

    conn_ins = db_controller.set_connection_instance_global(
        host, user, password, database)
    return conn_ins