Permalink
Browse files

Plugins: make on_load take "g" so it can add stuff to globals.

  • Loading branch information...
1 parent 3520ea5 commit dc03b8b6fd0ade1bedac5d3e47691b232addc07f @spladug spladug committed Mar 22, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 r2/r2/lib/plugin.py
View
@@ -55,7 +55,7 @@ def template_dir(self):
def static_dir(self):
return os.path.join(self.path, 'public')
- def on_load(self):
+ def on_load(self, g):
pass
def add_js(self, module_registry=None):
@@ -142,7 +142,7 @@ def load_plugins(self):
g.config.add_spec(plugin.config)
config['pylons.paths']['templates'].insert(0, plugin.template_dir)
plugin.add_js()
- plugin.on_load()
+ plugin.on_load(g)
def load_controllers(self):
for plugin in self:

0 comments on commit dc03b8b

Please sign in to comment.