diff options
Diffstat (limited to 'procurement/forms.py')
-rw-r--r-- | procurement/forms.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/procurement/forms.py b/procurement/forms.py new file mode 100644 index 0000000..4e8b0aa --- /dev/null +++ b/procurement/forms.py @@ -0,0 +1,14 @@ +from django import forms +from procurement.models import Component + + +class ComponentSearchForm(forms.Form): + component = forms.ModelChoiceField( + queryset=Component.objects.all(), + required=False + ) + + def __init__(self, *args, **kwargs): + super(ComponentSearchForm, self).__init__(*args, **kwargs) + self.fields['component'].widget.attrs.update({"class": "form-control"}) + |