old_contents: from fantasydota import DBSession
  from fantasydota.models import Hero
  from pyramid.view import view_config
  
  
  @view_config(route_name="hero", renderer="json")
  def hero(request):
      session = DBSession()
      week = int(request.args.get('week'))
      hero_values = session.query(Hero).filter(Hero.league == week).all()
      return {'week': week, 'heroes': hero_values}
new_contents: from fantasydota import DBSession
  from fantasydota.models import Hero
  from pyramid.view import view_config
  
  
  @view_config(route_name="hero", renderer="json")
  def hero(request):
      session = DBSession()
      week = int(request.params.get('week', '1'))
      hero_values = session.query(Hero).filter(Hero.league == week).all()
      return {'week': week, 'heroes': hero_values}
subject: fix api for hero