ea80f05030fee790438e00e7c73f064a71ef1613
1 from collections
import namedtuple
3 from pkg_resources
import resource_filename
6 from spline
.lib
import helpers
7 from spline
.lib
.plugin
import PluginBase
, PluginLink
, Priority
9 import splinext
.frontpage
.controllers
.frontpage
10 from splinext
.frontpage
.sources
import FeedSource
, GitSource
12 def add_routes_hook(map, *args
, **kwargs
):
13 """Hook to inject some of our behavior into the routes configuration."""
14 map.connect('/', controller
='frontpage', action
='index')
17 class FrontPagePlugin(PluginBase
):
18 def controllers(self
):
20 frontpage
= splinext
.frontpage
.controllers
.frontpage
.FrontPageController
,
23 def template_dirs(self
):
25 (resource_filename(__name__
, 'templates'), Priority
.FIRST
)
30 ('routes_mapping', Priority
.NORMAL
, add_routes_hook
),
31 ('frontpage_updates_rss', Priority
.NORMAL
, FeedSource
),
32 ('frontpage_updates_git', Priority
.NORMAL
, GitSource
),