diff --git a/InvenTree/part/forms.py b/InvenTree/part/forms.py index 85a851e235..7962ec3252 100644 --- a/InvenTree/part/forms.py +++ b/InvenTree/part/forms.py @@ -37,6 +37,24 @@ class PartModelChoiceField(forms.ModelChoiceField): return label +class PartImageDownloadForm(HelperForm): + """ + Form for downloading an image from a URL + """ + + url = forms.URLField( + label=_('URL'), + help_text=_('Image URL'), + required=True, + ) + + class Meta: + model = Part + fields = [ + 'url', + ] + + class PartImageForm(HelperForm): """ Form for uploading a Part image """