2 from __future__
import absolute_import
, division
7 import pokedex
.db
.tables
as tables
8 from pokedex
.struct
import SaveFilePokemon
9 from pylons
import config
, request
, response
, session
, tmpl_context
as c
, url
10 from pylons
.controllers
.util
import abort
, redirect_to
11 from sqlalchemy
.orm
.exc
import NoResultFound
13 from spline
.model
import meta
14 from spline
.lib
.base
import BaseController
, render
15 from spline
.lib
import helpers
as h
16 from splinext
.gts
import model
as gts_model
18 log
= logging
.getLogger(__name__
)
20 class GTSBrowseController(BaseController
):
23 u
"""Show a list of all Pokémon currently uploaded to the GTS."""
25 gts_pokemons
= meta
.Session
.query(gts_model
.GTSPokemon
).all()
28 for gts_pokemon
in gts_pokemons
:
29 savefile
= SaveFilePokemon(gts_pokemon
.pokemon_blob
)
30 c
.savefiles
.append(savefile
)
32 return render('/gts/list.mako')