diff rhodecode/config/environment.py @ 2105:926f55b038bc beta

added initial rc-extension module - possible to store additional mappings for stats - possible to overwrite and add to whoosh index extensions issue #322 - post create repo hook callback - post push/pull hooks callback
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 06 Mar 2012 23:03:10 +0200
parents 6020e3884a58
children 3ed6b94030ae
line wrap: on
line diff
--- a/rhodecode/config/environment.py	Mon Mar 05 16:58:55 2012 +0200
+++ b/rhodecode/config/environment.py	Tue Mar 06 23:03:10 2012 +0200
@@ -19,6 +19,7 @@
 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config
 from rhodecode.model import init_model
 from rhodecode.model.scm import ScmModel
+from rhodecode.lib.vcs.utils.fakemod import create_module
 
 log = logging.getLogger(__name__)
 
@@ -46,6 +47,11 @@
     config['pylons.app_globals'] = app_globals.Globals(config)
     config['pylons.h'] = rhodecode.lib.helpers
     rhodecode.CONFIG = config
+
+    path = os.path.join(config['here'], 'rcextensions', '__init__.py')
+    if os.path.isfile(path):
+        rcext = create_module('rc', path)
+        rhodecode.EXTENSIONS = rcext
     # Setup cache object as early as possible
     import pylons
     pylons.cache._push_object(config['pylons.app_globals'].cache)