feat: add scouting search sorting and pagination

This commit is contained in:
bisco
2026-04-07 17:18:36 +02:00
parent 6c53cae7a1
commit 6d8af021ce
4 changed files with 270 additions and 5 deletions

View File

@ -8,7 +8,20 @@ from .models import Competition, Role, Season, Specialty, Team
class PlayerSearchForm(forms.Form):
SORT_CHOICES = [
("name_asc", "Name (A-Z)"),
("name_desc", "Name (Z-A)"),
("age_youngest", "Age (youngest first)"),
("height_desc", "Height (tallest first)"),
("weight_desc", "Weight (heaviest first)"),
("points_desc", "Matching context points (high to low)"),
("assists_desc", "Matching context assists (high to low)"),
("ts_pct_desc", "Matching context TS% (high to low)"),
("blocks_desc", "Matching context blocks (high to low)"),
]
name = forms.CharField(required=False, label="Name")
sort = forms.ChoiceField(required=False, choices=SORT_CHOICES, initial="name_asc")
position = forms.ChoiceField(
required=False,