Tidied up presentation: correct ordering, CSS, and no more debug junk.
[zzz-spline-frontpage.git] / splinext / frontpage / __init__.py
1 from pkg_resources import resource_filename
2
3 from spline.lib.plugin import PluginBase
4 from spline.lib.plugin import PluginBase, PluginLink, Priority
5
6 import splinext.frontpage.controllers.frontpage
7
8 def add_routes_hook(map, *args, **kwargs):
9 """Hook to inject some of our behavior into the routes configuration."""
10 map.connect('/', controller='frontpage', action='index')
11
12
13 class FrontPagePlugin(PluginBase):
14 def controllers(self):
15 return dict(
16 frontpage = splinext.frontpage.controllers.frontpage.FrontPageController,
17 )
18
19 def template_dirs(self):
20 return [
21 (resource_filename(__name__, 'templates'), Priority.FIRST)
22 ]
23
24 def hooks(self):
25 return [
26 ('routes_mapping', Priority.NORMAL, add_routes_hook),
27 ]