From 12d1f9fd979c11b9e3a3a89b1595b07569b88f79 Mon Sep 17 00:00:00 2001 From: workmai Date: Thu, 4 Oct 2018 12:14:39 -0600 Subject: Initial commit of the coding assignment base project --- procurement/forms.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 procurement/forms.py (limited to 'procurement/forms.py') 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"}) + -- cgit v1.1