c1b0fb5d436b8034be05fb39045c11ab1c244738
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
7 import spline
.model
as model
8 import spline
.model
.meta
as meta
10 import spline
.plugins
.gts
.controllers
.gts
11 import spline
.plugins
.gts
.model
13 def add_routes_hook(map, *args
, **kwargs
):
14 """Hook to inject some of our behavior into the routes configuration."""
15 # These are the GTS URLs
16 map.connect('/pokemondpds/worldexchange/{page}.asp', controller
='gts', action
='dispatch')
17 map.connect('/pokemondpds/common/{page}.asp', controller
='gts', action
='dispatch')
20 class GTSPlugin(PluginBase
):
21 def controllers(self
):
23 gts
= spline
.plugins
.gts
.controllers
.gts
.GTSController
,
28 spline
.plugins
.gts
.model
.GTSPokemon
,
31 def template_dirs(self
):
33 (resource_filename(__name__
, 'templates'), Priority
.NORMAL
)
38 ('routes_mapping', Priority
.NORMAL
, add_routes_hook
),