Answers for "flask mongoengine configuration"

0

flask mongoengine configuration

'''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)
Posted by: Guest on March-29-2021

Python Answers by Framework

Browse Popular Code Answers by Language