📜  flask mongoengine 入门 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:23.530000             🧑  作者: Mango

代码示例1
'''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)