From f52dc7e868cfbd44f35b32103c06024f144d9f75 Mon Sep 17 00:00:00 2001
From: Eevee <git@veekun.com>
Date: Sun, 22 Aug 2010 17:59:38 -0700
Subject: [PATCH] Upgrade to Pylons 1.0.  #283

---
 splinext/gts/__init__.py               | 2 +-
 splinext/gts/controllers/gts.py        | 2 +-
 splinext/gts/controllers/gts_browse.py | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

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')
-- 
2.7.4