Pagination improvements, allow to select page size

This commit is contained in:
Raphael Michel
2017-12-09 19:47:47 +01:00
parent f5bf2ac4ca
commit 9e84e78215
14 changed files with 66 additions and 32 deletions

View File

@@ -24,15 +24,15 @@ from pretix.control.forms.organizer import (
)
from pretix.control.permissions import OrganizerPermissionRequiredMixin
from pretix.control.signals import nav_organizer
from pretix.control.views import PaginationMixin
from pretix.helpers.urls import build_absolute_uri
from pretix.presale.style import regenerate_organizer_css
class OrganizerList(ListView):
class OrganizerList(PaginationMixin, ListView):
model = Organizer
context_object_name = 'organizers'
template_name = 'pretixcontrol/organizers/index.html'
paginate_by = 30
def get_queryset(self):
qs = Organizer.objects.all()