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

Moved PAGINATE_COUNT to configuration.py

This commit is contained in:
Jeremy Stretch
2016-05-23 12:55:03 -04:00
parent 81fd1dfde4
commit c96bfdbc18
5 changed files with 45 additions and 28 deletions

View File

@@ -1,6 +1,5 @@
from django_tables2 import RequestConfig
from django.conf import settings
from django.contrib import messages
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib.contenttypes.models import ContentType
@@ -64,8 +63,7 @@ class ObjectListView(View):
table.model = model
if 'pk' in table.base_columns and any([request.user.has_perm(perm) for perm in self.edit_permissions]):
table.base_columns['pk'].visible = True
RequestConfig(request, paginate={'per_page': settings.PAGINATE_COUNT, 'klass': EnhancedPaginator})\
.configure(table)
RequestConfig(request, paginate={'klass': EnhancedPaginator}).configure(table)
return render(request, self.template_name, {
'table': table,