Add sort field to search form

This commit is contained in:
Aroy-Art 2024-10-22 22:48:19 +02:00
parent c4071587da
commit 10e36dbb80
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -27,6 +27,19 @@ class SearchForm(forms.Form):
}
),
)
sort = forms.ChoiceField(
label="Sort by",
choices=[('1', 'Date'), ('2', 'Views'), ('3', 'Likes'), ('4', 'Relevance')],
initial='1',
required=False,
widget=forms.Select(
attrs={
'class': 'form-select',
}
)
)
mature = forms.ChoiceField(
label="Filter by Mature",
choices=[('1', 'All'),('2', 'General'), ('3', 'Mature/Adult')],