diff --git a/r2/r2/lib/plugin.py b/r2/r2/lib/plugin.py index cfa1a5a8a..c3c2fea0e 100644 --- a/r2/r2/lib/plugin.py +++ b/r2/r2/lib/plugin.py @@ -45,9 +45,9 @@ class Plugin(object): return os.path.dirname(module.__file__) @property - def template_dirs(self): + def template_dir(self): """Add module/templates/ as a template directory.""" - return [os.path.join(self.path, 'templates')] + return os.path.join(self.path, 'templates') @property def static_dir(self): @@ -119,7 +119,7 @@ class PluginLoader(object): # Load plugin g.config.add_spec(plugin.config) - config['pylons.paths']['templates'].extend(plugin.template_dirs) + config['pylons.paths']['templates'].insert(0, plugin.template_dir) plugin.add_js() plugin.on_load()