Started adding functionality for assets and cables forms to be dynamically swapped

This commit is contained in:
Matthew Smith
2019-10-05 21:16:03 +01:00
parent e3cbcbd151
commit 7359e05427
2 changed files with 11 additions and 0 deletions

View File

@@ -14,6 +14,11 @@ class AssetForm(forms.ModelForm):
raise ValidationError("Cannot sell an item before it is acquired")
return self.cleaned_data["date_sold"]
class CableForm(AssetForm):
class Meta:
model = models.Cable
fields = '__all__'
class SupplierForm(forms.ModelForm):
class Meta:
model = models.Supplier