aboutsummaryrefslogtreecommitdiffstats
path: root/servo/forms
diff options
context:
space:
mode:
Diffstat (limited to 'servo/forms')
-rw-r--r--servo/forms/devices.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/servo/forms/devices.py b/servo/forms/devices.py
index 8d41c02..a95715e 100644
--- a/servo/forms/devices.py
+++ b/servo/forms/devices.py
@@ -33,8 +33,7 @@ class DeviceSearchForm(forms.Form):
def __init__(self, *args, **kwargs):
super(DeviceSearchForm, self).__init__(*args, **kwargs)
- self.fields['description'] = AutocompleteCharField(
- '/api/device_models/',
+ self.fields['description'] = AutocompleteCharField('/api/device_models/',
max_length=128,
required=False,
label=_('Description contains')
@@ -42,17 +41,19 @@ class DeviceSearchForm(forms.Form):
class DeviceForm(forms.ModelForm):
+ """The form for editing devices in the /devices view"""
+ """
+ tags = forms.ModelMultipleChoiceField(
+ queryset=Tag.objects.filter(type='device'),
+ required=False
+ )
+ """
class Meta:
model = Device
exclude = ('spec', 'customers', 'files', 'image_url',
'exploded_view_url', 'manual_url', )
widgets = {'purchased_on': DatepickerInput()}
- tags = forms.ModelMultipleChoiceField(
- queryset=Tag.objects.filter(type='device'),
- required=False
- )
-
class DeviceUploadForm(forms.Form):
datafile = forms.FileField(