X-Git-Url: http://git.veekun.com/zzz-spline-gts.git/blobdiff_plain/04080d76b1d682b28f89e5d9403759a3782fb8f3..5b4b01f38ed0213ebb6aa39bf69e46926150e7fe:/splinext/gts/__init__.py diff --git a/splinext/gts/__init__.py b/splinext/gts/__init__.py index bd10c07..728a9d8 100644 --- a/splinext/gts/__init__.py +++ b/splinext/gts/__init__.py @@ -1,14 +1,11 @@ from pkg_resources import resource_filename -from pylons import c, session +from pylons import session, tmpl_context as c from spline.lib.plugin import PluginBase from spline.lib.plugin import PluginBase, PluginLink, Priority -import spline.model as model -import spline.model.meta as meta - import splinext.gts.controllers.gts -import splinext.gts.model +import splinext.gts.controllers.gts_browse def add_routes_hook(map, *args, **kwargs): """Hook to inject some of our behavior into the routes configuration.""" @@ -16,23 +13,17 @@ def add_routes_hook(map, *args, **kwargs): map.connect('/pokemondpds/worldexchange/{page}.asp', controller='gts', action='dispatch') map.connect('/pokemondpds/common/{page}.asp', controller='gts', action='dispatch') + # Web-side stuff + map.connect('/gts', controller='gts_browse', action='list') + class GTSPlugin(PluginBase): def controllers(self): return dict( gts = splinext.gts.controllers.gts.GTSController, + gts_browse = splinext.gts.controllers.gts_browse.GTSBrowseController, ) - def model(self): - return [ - splinext.gts.model.GTSPokemon, - ] - - def template_dirs(self): - return [ - (resource_filename(__name__, 'templates'), Priority.NORMAL) - ] - def hooks(self): return [ ('routes_mapping', Priority.NORMAL, add_routes_hook),