Netbox Tabs #19562
Unanswered
an-adestis
asked this question in
Help Wanted!
Netbox Tabs
#19562
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description:
I am developing a custom view in a NetBox plugin, but the custom tab (ViewTab) is not being displayed in the object view of the Certificate model.
Here is the relevant code snippet:
views.py:
from dcim.models import *
from dcim.forms import *
from dcim.tables import *
from dcim.filtersets import *
@register_model_view(Certificate, name='devices')
class CertificateAffectedDeviceView(generic.ObjectChildrenView):
queryset = Certificate.objects.all()
child_model = Device
table = DeviceTable
template_name = "adestis_netbox_certificate_management/device.html"
actions = {
'add': {'add'},
'export': {'view'},
'bulk_import': {'add'},
'bulk_edit': {'change'},
'bulk_remove_device': {'change'},
}
urls.py:
path('certificates/devices/', CertificateAffectedDeviceView.as_view(),
name='certificatedevices_list'),
Issue:
The custom tab (ViewTab) labeled "Devices" is not showing up in the Certificate detail view.
I expect a tab to appear on the certificate object page, allowing navigation to related Device objects.
Beta Was this translation helpful? Give feedback.
All reactions