Can't add ViewTab to a proxy view #16645
Unanswered
papounaise
asked this question in
Help Wanted!
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.
Uh oh!
There was an error while loading. Please reload this page.
-
It seems that I can't add a ViewTab to a proxy view. Like in :
@register_model_view(MyDeviceProxy, 'frontports')
class MyDeviceProxyFrontPortsView(DeviceComponentsView):
queryset = MyDeviceProxy.objects.all()
child_model = FrontPort
table = DeviceFrontPortTable
filterset = FrontPortFilterSet
template_name = 'dcim/device/frontports.html'
tab = ViewTab(
label=_('Proxy_tab'),
badge=lambda obj: obj.front_port_count,
weight=543,
hide_if_empty=True
)
Any idea about a solution or work around ?
Beta Was this translation helpful? Give feedback.
All reactions