24 lines
968 B
Python
24 lines
968 B
Python
from django import forms
|
|
|
|
|
|
class SearchForm(forms.Form):
|
|
category_choices = (
|
|
('alliance', 'Alliance'),
|
|
('character', 'Character'),
|
|
('corporation', 'Corporation')
|
|
)
|
|
search_text = forms.CharField(label='Search Text',
|
|
max_length=100,
|
|
min_length=3,
|
|
widget=forms.TextInput(
|
|
attrs={
|
|
'class': 'form-control',
|
|
'placeholder': 'Search Text'
|
|
},
|
|
))
|
|
category = forms.ChoiceField(choices=category_choices,
|
|
widget=forms.Select(
|
|
attrs={
|
|
'class': 'custom-select'
|
|
}
|
|
)) |