mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 01:41:22 -06:00
Upgraded django-tables2 to v2.0.2
This commit is contained in:
parent
9804db4551
commit
b05171b126
@ -623,11 +623,6 @@ class CableTable(BaseTable):
|
||||
args=[Accessor('pk')],
|
||||
verbose_name='ID'
|
||||
)
|
||||
# django-tables2 adds CSS `class="label"` which causes rendering issues
|
||||
label_ = tables.Column(
|
||||
accessor=Accessor('label'),
|
||||
verbose_name='Label'
|
||||
)
|
||||
termination_a_parent = tables.TemplateColumn(
|
||||
template_code=CABLE_TERMINATION_PARENT,
|
||||
accessor=Accessor('termination_a'),
|
||||
@ -659,7 +654,7 @@ class CableTable(BaseTable):
|
||||
class Meta(BaseTable.Meta):
|
||||
model = Cable
|
||||
fields = (
|
||||
'pk', 'id', 'label_', 'termination_a_parent', 'termination_a', 'termination_b_parent', 'termination_b',
|
||||
'pk', 'id', 'label', 'termination_a_parent', 'termination_a', 'termination_b_parent', 'termination_b',
|
||||
'status', 'type', 'color', 'length',
|
||||
)
|
||||
|
||||
|
@ -336,7 +336,7 @@ class AggregateView(View):
|
||||
prefix_table.columns.show('pk')
|
||||
|
||||
paginate = {
|
||||
'klass': EnhancedPaginator,
|
||||
'paginator_class': EnhancedPaginator,
|
||||
'per_page': request.GET.get('per_page', settings.PAGINATE_COUNT)
|
||||
}
|
||||
RequestConfig(request, paginate).configure(prefix_table)
|
||||
@ -512,7 +512,7 @@ class PrefixPrefixesView(View):
|
||||
prefix_table.columns.show('pk')
|
||||
|
||||
paginate = {
|
||||
'klass': EnhancedPaginator,
|
||||
'paginator_class': EnhancedPaginator,
|
||||
'per_page': request.GET.get('per_page', settings.PAGINATE_COUNT)
|
||||
}
|
||||
RequestConfig(request, paginate).configure(prefix_table)
|
||||
@ -551,7 +551,7 @@ class PrefixIPAddressesView(View):
|
||||
ip_table.columns.show('pk')
|
||||
|
||||
paginate = {
|
||||
'klass': EnhancedPaginator,
|
||||
'paginator_class': EnhancedPaginator,
|
||||
'per_page': request.GET.get('per_page', settings.PAGINATE_COUNT)
|
||||
}
|
||||
RequestConfig(request, paginate).configure(ip_table)
|
||||
@ -840,7 +840,7 @@ class VLANGroupVLANsView(View):
|
||||
vlan_table.columns.hide('group')
|
||||
|
||||
paginate = {
|
||||
'klass': EnhancedPaginator,
|
||||
'paginator_class': EnhancedPaginator,
|
||||
'per_page': request.GET.get('per_page', settings.PAGINATE_COUNT)
|
||||
}
|
||||
RequestConfig(request, paginate).configure(vlan_table)
|
||||
@ -899,7 +899,7 @@ class VLANMembersView(View):
|
||||
members_table = tables.VLANMemberTable(members)
|
||||
|
||||
paginate = {
|
||||
'klass': EnhancedPaginator,
|
||||
'paginator_class': EnhancedPaginator,
|
||||
'per_page': request.GET.get('per_page', settings.PAGINATE_COUNT)
|
||||
}
|
||||
RequestConfig(request, paginate).configure(members_table)
|
||||
|
@ -25,7 +25,6 @@ from django_tables2 import RequestConfig
|
||||
from extras.models import CustomField, CustomFieldValue, ExportTemplate
|
||||
from utilities.utils import queryset_to_csv
|
||||
from utilities.forms import BootstrapMixin, CSVDataField
|
||||
from .constants import M2M_FIELD_TYPES
|
||||
from .error_handlers import handle_protectederror
|
||||
from .forms import ConfirmationForm
|
||||
from .paginator import EnhancedPaginator
|
||||
@ -138,7 +137,7 @@ class ObjectListView(View):
|
||||
|
||||
# Apply the request context
|
||||
paginate = {
|
||||
'klass': EnhancedPaginator,
|
||||
'paginator_class': EnhancedPaginator,
|
||||
'per_page': request.GET.get('per_page', settings.PAGINATE_COUNT)
|
||||
}
|
||||
RequestConfig(request, paginate).configure(table)
|
||||
|
@ -3,7 +3,7 @@ django-cors-headers==2.4.0
|
||||
django-debug-toolbar==1.10.1
|
||||
django-filter==2.0.0
|
||||
django-mptt==0.9.1
|
||||
django-tables2==1.21.2
|
||||
django-tables2==2.0.2
|
||||
django-taggit==0.23.0
|
||||
django-taggit-serializer==0.1.7
|
||||
django-timezone-field==3.0
|
||||
|
Loading…
Reference in New Issue
Block a user