Esempio n. 1
0
  def get(self):
    logging.debug("checking team retirement....")

    sixteen_weeks_ago = datetime.date.today() - datetime.timedelta(weeks=16)

    for team in Team.all().filter("retired =", False):
      if not team.last_active:
        assert team.matches == 0
        continue

      if team.last_active < sixteen_weeks_ago:
        logging.debug("retiring %s" % team.key().name())
        misc.retire_team(team)
Esempio n. 2
0
  def post(self):
    team = Team.get(self.request.get("team_key"))

    if not team.matches:
      team.delete()

    else:
      team.retired = not team.retired
      if not team.retired:
        misc.retire_team(team)
      team.put()

    views.LeagueStandings.clear()
Esempio n. 3
0
    def post(self):
        team = Team.get(self.request.get("team_key"))

        if not team.matches:
            team.delete()

        else:
            team.retired = not team.retired
            if not team.retired:
                misc.retire_team(team)
            team.put()

        views.LeagueStandings.clear()