# 数据库配置
DATABASES = {
"default": {
"ENGINE": "mainsys.mysqlpool",
"NAME": "el_product",
"USER": "select_user",
"PASSWORD": "select_user@321",
"HOST": "10.32",
},
"bt_investment": {
"ENGINE": "mainsys.mysqlpool",
"NAME": "",
"USER": "aaa",
"PASSWORD": "aaa",
"HOST": "10.32",
"ATOMIC_REQUESTS":True
},
"industrychain": {
"ENGINE": "mainsys.mysqlpool",
"NAME": "industrychain",
"USER": "select_user",
"PASSWORD": "select_user@321",
"HOST": "10.32",
},
}
...
...
...
with transaction.atomic(using="bt_investment"): # 指定数据源,可以在python代码的任何位置使用
for obj in execel_data_formart:
网友评论