Skip to content

Instantly share code, notes, and snippets.

@rozza
Created May 18, 2012 11:00
Show Gist options
  • Save rozza/2724682 to your computer and use it in GitHub Desktop.
Save rozza/2724682 to your computer and use it in GitHub Desktop.
from flask import Flask
from flask.ext.mongoengine import MongoEngine
app = Flask(__name__)
app.config.from_pyfile('the-config.cfg')
db = MongoEngine(app) # Pass the app
db.init_app(app) # Initiate the app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment