flask mongoengine configuration

Solutions on MaxInterview for flask mongoengine configuration by the best coders in the world

showing results for - "flask mongoengine configuration"
Conor
15 May 2017
1'''Basic setup can be done by defining MONGODB_SETTINGS
2on app.config and creating a MongoEngine instance.'''
3from flask import Flask
4from flask_mongoengine import MongoEngine
5
6app = Flask(__name__)
7app.config['MONGODB_SETTINGS'] = {
8    "db": "myapp",
9}
10db = MongoEngine(app)