From 74e3bccae479483d0adeae96926bc9c915d7a848 Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Wed, 8 Feb 2012 16:54:03 -0800 Subject: [PATCH] Add on_load method to plugins. --- r2/r2/lib/plugin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/r2/r2/lib/plugin.py b/r2/r2/lib/plugin.py index d5a047760..ae9357894 100644 --- a/r2/r2/lib/plugin.py +++ b/r2/r2/lib/plugin.py @@ -21,6 +21,9 @@ class Plugin(object): def static_dir(self): return os.path.join(self.path, 'public') + def on_load(self): + pass + def add_js(self): from r2.lib import js for name, module in self.js.iteritems(): @@ -61,6 +64,7 @@ class PluginLoader(object): plugin = self.plugins[name] = plugin_cls() config['pylons.paths']['templates'].extend(plugin.template_dirs) plugin.add_js() + plugin.on_load() return self def load_controllers(self):