def get_fair(): return Team.get(FAIR_ID)
def team(self): from vilya.models.team import Team return Team.get(self.team_id)
def teams(self): from vilya.models.nteam import TeamUserRelationship from vilya.models.team import Team rs = TeamUserRelationship.gets(user_id=self.name) return filter(None, [Team.get(r.team_id) for r in rs])
def __init__(self, data): NotificationDispatcher.__init__(self, data) self._team_id = data.get('team_id') self._last_week = data.get('last_week') self._team = Team.get(self._team_id)
def get_teams(): rs = store.execute('select id from team') for id, in rs: yield Team.get(id)
def target(self): from vilya.models.team import Team return Team.get(self.team_id)