]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/config/environment.py
Convert the README to rST, since that's what distutils wants.
[bluechips.git] / bluechips / config / environment.py
index 0f8f226af31e22ae69ad33c447d2dd97ac16566e..75122f1c54f5ecde21210c2920b89ea8cb623f91 100644 (file)
@@ -4,6 +4,7 @@ import os
 from mako.lookup import TemplateLookup
 from pylons import config
 from sqlalchemy import engine_from_config
+from mailer import Mailer
 
 import bluechips.lib.app_globals as app_globals
 import bluechips.lib.helpers
@@ -37,8 +38,10 @@ def load_environment(global_conf, app_conf):
         default_filters=['escape'])
     
     # Setup SQLAlchemy database engine
-    engine = engine_from_config(config, 'sqlalchemy.', pool_recycle=3600)
+    engine = engine_from_config(config, 'sqlalchemy.')
     init_model(engine)
     
     # CONFIGURATION OPTIONS HERE (note: all config options will override
     # any Pylons config options)
+    config['pylons.app_globals'].mailer = Mailer(config.get('mailer.host',
+                                                            '127.0.0.1'))