import os
from pymongo.uri_parser import parse_uri

TORNADO = {
    'debug': True,
    'static_path': os.path.join(os.path.dirname(__file__), '..', 'static'),
    'template_path': os.path.join(os.path.dirname(__file__), '..', 'templates'),
    'cookie_secret': 'b722aa661f45e3f793bdd13eb5ec83b7',
    'login_url': '/auth/login/',
    'domain_name': 'localhost',
    'port': 5000,
    'xsrf_cookies': True,
    'autoescape': None,

}

mongo_url = os.getenv('MONGOHQ_URL', 'mongodb://localhost:27017/testtornado')
mongo_args = parse_uri(mongo_url)

MONGO = {
    'name': mongo_args['database'],
    'options': {},
    'auth': {
        'name': 'heroku',
        'password': '70c719fec315a71c035e620835d45a4b'
    }
}
