feat: add scouting search sorting and pagination
This commit is contained in:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user