mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Introduced SearchTable for improved performance
This commit is contained in:
@@ -4,7 +4,9 @@ from django.utils.safestring import mark_safe
|
||||
|
||||
|
||||
class BaseTable(tables.Table):
|
||||
|
||||
"""
|
||||
Default table for object lists
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(BaseTable, self).__init__(*args, **kwargs)
|
||||
|
||||
@@ -18,6 +20,17 @@ class BaseTable(tables.Table):
|
||||
}
|
||||
|
||||
|
||||
class SearchTable(tables.Table):
|
||||
"""
|
||||
Default table for search results
|
||||
"""
|
||||
class Meta:
|
||||
attrs = {
|
||||
'class': 'table table-hover',
|
||||
}
|
||||
orderable = False
|
||||
|
||||
|
||||
class ToggleColumn(tables.CheckBoxColumn):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
Reference in New Issue
Block a user