98ad4af78a1e824421f12b1cdd368843b7308098
1 from pkg_resources
import resource_filename
3 from pylons
import c
, session
5 from spline
.lib
.plugin
import PluginBase
6 from spline
.lib
.plugin
import PluginBase
, PluginLink
, Priority
8 import splinext
.forum
.controllers
.forum
10 def add_routes_hook(map, *args
, **kwargs
):
11 """Hook to inject some of our behavior into the routes configuration."""
12 map.connect('/forums', controller
='forum', action
='forums')
13 map.connect('/forums/{forum_id}', controller
='forum', action
='threads')
14 map.connect('/forums/{forum_id}/threads/{thread_id}', controller
='forum', action
='posts')
17 class ForumPlugin(PluginBase
):
18 def controllers(self
):
20 forum
= splinext
.forum
.controllers
.forum
.ForumController
,
25 ('routes_mapping', Priority
.NORMAL
, add_routes_hook
),