Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Plugins: make on_load take "g" so it can add stuff to globals.
Browse files Browse the repository at this point in the history
  • Loading branch information
spladug committed Mar 31, 2013
1 parent 3520ea5 commit dc03b8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions r2/r2/lib/plugin.py
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit dc03b8b

Please sign in to comment.