a3f259e8552b6c1d78da78addedcc3a41c1a3326
[zzz-spline-forum.git] / spline / plugins / forum / __init__.py
1 from pkg_resources import resource_filename
2
3 from pylons import c, session
4
5 from spline.lib.plugin import PluginBase
6 from spline.lib.plugin import PluginBase, PluginLink, Priority
7 import spline.model as model
8 import spline.model.meta as meta
9
10 import spline.plugins.forum.controllers.forum
11 import spline.plugins.forum.model
12
13 def add_routes_hook(map, *args, **kwargs):
14 """Hook to inject some of our behavior into the routes configuration."""
15 map.connect('/forum', controller='forum', action='index')
16
17
18 class ForumPlugin(PluginBase):
19 def controllers(self):
20 return dict(
21 forum = spline.plugins.forum.controllers.forum.ForumController,
22 )
23
24 def template_dirs(self):
25 return [
26 (resource_filename(__name__, 'templates'), Priority.NORMAL)
27 ]
28
29 def hooks(self):
30 return [
31 ('routes_mapping', Priority.NORMAL, add_routes_hook),
32 ]