1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Migrate DCIM views to use common object list template

This commit is contained in:
Jeremy Stretch
2020-02-13 14:07:15 -05:00
parent 4ef15e4dc8
commit fff657cd5a
26 changed files with 21 additions and 453 deletions

View File

@ -72,6 +72,7 @@ class ObjectListView(View):
filterset_form = None
table = None
template_name = 'utilities/obj_list.html'
action_buttons = ('add', 'import', 'export')
def queryset_to_yaml(self):
"""
@ -178,6 +179,7 @@ class ObjectListView(View):
'content_type': content_type,
'table': table,
'permissions': permissions,
'action_buttons': self.action_buttons,
'filter_form': self.filterset_form(request.GET, label_suffix='') if self.filterset_form else None,
}
context.update(self.extra_context())