Add 'stored_location_url' to SoftwareLicense (#28)

Closes #27
This commit is contained in:
wkoot
2023-09-22 02:42:02 +02:00
committed by GitHub
parent aa41f8a402
commit 2501e41b7c
5 changed files with 60 additions and 15 deletions
+5 -1
View File
@@ -4,13 +4,15 @@ from django.utils.translation import gettext_lazy as _
from netbox.forms import NetBoxModelForm, NetBoxModelImportForm, NetBoxModelBulkEditForm, NetBoxModelFilterSetForm
from netbox_slm.models import SoftwareProduct, SoftwareProductVersion, SoftwareProductInstallation, SoftwareLicense
from utilities.forms.fields import DynamicModelChoiceField, TagFilterField
from utilities.forms.fields import DynamicModelChoiceField, TagFilterField, LaxURLField
from utilities.forms.widgets import APISelect, DatePicker
class SoftwareLicenseForm(NetBoxModelForm):
"""Form for creating a new SoftwareLicense object."""
stored_location_url = LaxURLField(required=False)
software_product = DynamicModelChoiceField(
queryset=SoftwareProduct.objects.all(),
required=True,
@@ -44,6 +46,7 @@ class SoftwareLicenseForm(NetBoxModelForm):
"description",
"type",
"stored_location",
"stored_location_url",
"start_date",
"expiration_date",
"software_product",
@@ -76,6 +79,7 @@ class SoftwareLicenseImportForm(NetBoxModelImportForm):
"description",
"type",
"stored_location",
"stored_location_url",
"start_date",
"expiration_date",
)