fix db error

This commit is contained in:
Ryan Shea
2014-10-27 17:58:01 -04:00
parent 3a83574e47
commit f83be94a25
2 changed files with 3 additions and 2 deletions

View File

@@ -1 +1 @@
web: python runserver.py
web: gunicorn runserver:app -w 3

View File

@@ -17,5 +17,6 @@ from mongoengine import connect
from flask.ext.mongoengine import MongoEngine
if 'MONGODB_URI' in app.config:
connect(app.config['MONGODB_DB'], host=app.config['MONGODB_URI'])
MONGODB_DB = app.config['MONGODB_URI'].split('/')[-1]
connect(MONGODB_DB, host=app.config['MONGODB_URI'])
db = MongoEngine(app)