Source

wdmmg / wdmmg / model / __init__.py

Full commit
"""The application's model objects"""
import mongo

from wdmmg.model.mongo import Base, Explanation
from wdmmg.model.dataset import Dataset
from wdmmg.model.classifier import Classifier
from wdmmg.model.entry import Entry
from wdmmg.model.entity import Entity

def init_mongo(config):
    host = config.get('mongodb.host', 'localhost')
    port = config.get('mongodb.port', 27017)
    mongo.make_connection(host, port) 
    mongo.db_name = config.get('mongodb.database', 'wdmmg')