def _connect(conn_settings):
"""Given a dict of connection settings, create a connection to
MongoDB by calling mongoengine.connect and return its result.
"""
db_name = conn_settings.pop('name')
return mongoengine.connect(db_name, **conn_settings)
评论列表
文章目录