Django连接MongoDB
myclient = pymongo.MongoClient(host=MONGO_HOST, port=MONGO_PORT) myclient.库.authenticate(MONGO_USER, MONGO_PWD, mechanism='SCRAM-SHA-1') db = myclient['库']
myclient = pymongo.MongoClient(host=MONGO_HOST, port=MONGO_PORT) myclient.库.authenticate(MONGO_USER, MONGO_PWD, mechanism='SCRAM-SHA-1') db = myclient['库']