Files
NetBox-SLM/netbox_slm/views/software_license.py
T
2024-10-14 13:41:22 +02:00

43 lines
1.3 KiB
Python

from netbox.views import generic
from netbox_slm import filtersets, forms, tables
from netbox_slm.models import SoftwareLicense
class SoftwareLicenseListView(generic.ObjectListView):
"""View for listing all existing SoftwareLicenses."""
queryset = SoftwareLicense.objects.all()
filterset = filtersets.SoftwareLicenseFilterSet
filterset_form = forms.SoftwareLicenseFilterForm
table = tables.SoftwareLicenseTable
class SoftwareLicenseView(generic.ObjectView):
"""Display SoftwareLicense details"""
queryset = SoftwareLicense.objects.all()
class SoftwareLicenseEditView(generic.ObjectEditView):
"""View for editing and creating a SoftwareLicense instance."""
queryset = SoftwareLicense.objects.all()
form = forms.SoftwareLicenseForm
class SoftwareLicenseDeleteView(generic.ObjectDeleteView):
"""View for deleting a SoftwareLicense instance"""
queryset = SoftwareLicense.objects.all()
class SoftwareLicenseBulkDeleteView(generic.BulkDeleteView):
queryset = SoftwareLicense.objects.all()
table = tables.SoftwareLicenseTable
class SoftwareLicenseBulkImportView(generic.BulkImportView):
queryset = SoftwareLicense.objects.all()
table = tables.SoftwareLicenseTable
model_form = forms.SoftwareLicenseBulkImportForm