From: Eevee Date: Mon, 23 Aug 2010 00:59:38 +0000 (-0700) Subject: Upgrade to Pylons 1.0. #283 X-Git-Tag: veekun-promotions/2011021501 X-Git-Url: http://git.veekun.com/zzz-spline-gts.git/commitdiff_plain/refs/tags/veekun-promotions/2011021501 Upgrade to Pylons 1.0. #283 --- diff --git a/splinext/gts/__init__.py b/splinext/gts/__init__.py index 174e8db..728a9d8 100644 --- a/splinext/gts/__init__.py +++ b/splinext/gts/__init__.py @@ -1,6 +1,6 @@ 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 diff --git a/splinext/gts/controllers/gts.py b/splinext/gts/controllers/gts.py index 1349c16..c4bed33 100644 --- a/splinext/gts/controllers/gts.py +++ b/splinext/gts/controllers/gts.py @@ -14,7 +14,7 @@ import pokedex.db.tables as tables import pokedex.formulae from pokedex.struct import SaveFilePokemon from pylons import config, request, response, session, tmpl_context as c, url -from pylons.controllers.util import abort, redirect_to +from pylons.controllers.util import abort, redirect from sqlalchemy import and_, or_, not_ from sqlalchemy.orm import aliased, contains_eager, eagerload, eagerload_all, join from sqlalchemy.orm.exc import NoResultFound diff --git a/splinext/gts/controllers/gts_browse.py b/splinext/gts/controllers/gts_browse.py index acd6d15..8b8cb8a 100644 --- a/splinext/gts/controllers/gts_browse.py +++ b/splinext/gts/controllers/gts_browse.py @@ -7,14 +7,14 @@ import pokedex.db import pokedex.db.tables as tables from pokedex.struct import SaveFilePokemon from pylons import config, request, response, session, tmpl_context as c, url -from pylons.controllers.util import abort, redirect_to +from pylons.controllers.util import abort, redirect from sqlalchemy.orm.exc import NoResultFound from spline.model import meta from spline.lib.base import BaseController, render from spline.lib import helpers as h from splinext.gts import model as gts_model -from splinext.pokedex.db import pokedex_session +import splinext.pokedex.db as db log = logging.getLogger(__name__) @@ -28,7 +28,7 @@ class GTSBrowseController(BaseController): c.savefiles = [] for gts_pokemon in gts_pokemons: savefile = SaveFilePokemon(gts_pokemon.pokemon_blob) - savefile.use_database_session(pokedex_session) + savefile.use_database_session(db.pokedex_session) c.savefiles.append(savefile) return render('/gts/list.mako')