Пример #1
0
 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
Пример #2
0
 def __init__(self, *args, **kwargs):
     super().__init__(*args, **kwargs)
     s = get_current_season()
     self.queryset = Player.objects.all()
Пример #3
0
 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
Пример #4
0
 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)
     ]
Пример #5
0
 def get_players(self):
     s = get_current_season()
     sp = Player.objects.all().order_by('last_name', 'first_name')
     return sp