📅  最后修改于: 2022-03-11 14:45:23.530000             🧑  作者: Mango
'''Basic setup can be done by defining MONGODB_SETTINGS
on app.config and creating a MongoEngine instance.'''
from flask import Flask
from flask_mongoengine import MongoEngine
app = Flask(__name__)
app.config['MONGODB_SETTINGS'] = {
"db": "myapp",
}
db = MongoEngine(app)