def get_players(self): s = get_current_season() sp = SeasonPlayer.objects.filter(season=s).select_related('player') if self.members_only: sp.filter(blockmember=True) sp.order_by('player__user__last_name', 'player__gender') # sp.values('id', # 'player__user__first_name', 'player__user__last_name', # 'player__gender', 'player__ntrp', 'player__microntrp', # 'player__user__email', 'player__phone', 'blockmember') return sp
def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) s = get_current_season() self.queryset = Player.objects.all()
def get_players(self): s = get_current_season() sp = SeasonPlayer.objects.filter(season=s).select_related('player') sp.order_by('player__user__last_name', 'player__gender') return sp
def get_players(self): s = get_current_season() sp = SeasonPlayer.objects.filter(season=s) return [ p.player for p in sp if (not self.members_only or p.blockmember) ]
def get_players(self): s = get_current_season() sp = Player.objects.all().order_by('last_name', 'first_name') return sp