Use the local model module instead of spline.model.
[zzz-spline-gts.git] / splinext / gts / __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 splinext.gts.controllers.gts
8
9 def add_routes_hook(map, *args, **kwargs):
10 """Hook to inject some of our behavior into the routes configuration."""
11 # These are the GTS URLs
12 map.connect('/pokemondpds/worldexchange/{page}.asp', controller='gts', action='dispatch')
13 map.connect('/pokemondpds/common/{page}.asp', controller='gts', action='dispatch')
14
15
16 class GTSPlugin(PluginBase):
17 def controllers(self):
18 return dict(
19 gts = splinext.gts.controllers.gts.GTSController,
20 )
21
22 def hooks(self):
23 return [
24 ('routes_mapping', Priority.NORMAL, add_routes_hook),
25 ]