def all_items(request): items = DBSession.query(Item).filter(not_(Item.name.startswith('item_recipe_'))).order_by('id').all() return template_params(request, items=items)
def trends_index(request): return template_params(request)
def all_heroes(request): heroes = DBSession.query(Hero).order_by('id').filter(Hero.released == True).all() return template_params(request, heroes=heroes)
def index(request): return template_params(request)
def hero_details(request): name = 'npc_dota_hero_{}'.format(request.matchdict['name'].replace('-', '_')) hero = DBSession.query(Hero).filter_by(name=name).one() return template_params(request, hero=hero)
def match_details(request): match = DBSession.query(Match).get(request.matchdict["id"]) return template_params(request, match=match)
def recent_matches(request): matches = DBSession.query(Match).order_by(Match.start_time.desc()).limit(25).all() return template_params(request, matches=matches)
def players_index(request): return template_params(request)
def player_details(request): player = DBSession.query(Player).filter_by(id=request.matchdict["id"]).one() return template_params(request, player=player)