Skip to content

Commit 4160532

Browse files
authored
Add pagination to tables (#376)
1 parent 0e6249b commit 4160532

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/staff/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class AnalysisOrderListView(StaffMixin, SingleTableMixin, FilterView):
9898
model = AnalysisOrder
9999
table_class = AnalysisOrderTable
100100
filterset_class = AnalysisOrderFilter
101+
table_pagination = {"per_page": 20}
101102

102103
def get_queryset(self) -> QuerySet[AnalysisOrder]:
103104
return (
@@ -118,6 +119,7 @@ class ExtractionOrderListView(StaffMixin, SingleTableMixin, FilterView):
118119
model = ExtractionOrder
119120
table_class = ExtractionOrderTable
120121
filterset_class = ExtractionOrderFilter
122+
table_pagination = {"per_page": 20}
121123

122124
def get_queryset(self) -> QuerySet[ExtractionOrder]:
123125
return (
@@ -159,6 +161,7 @@ class EqupimentOrderListView(StaffMixin, SingleTableMixin, FilterView):
159161
model = EquipmentOrder
160162
table_class = EquipmentOrderTable
161163
filterset_class = AnalysisOrderFilter
164+
table_pagination = {"per_page": 20}
162165

163166
def get_queryset(self) -> QuerySet[EquipmentOrder]:
164167
return (
@@ -520,7 +523,7 @@ def check_all_output(self, analyses: models.QuerySet) -> None:
520523

521524

522525
class SamplesListView(StaffMixin, SingleTableMixin, FilterView):
523-
table_pagination = False
526+
table_pagination = {"per_page": 50}
524527

525528
model = Sample
526529
table_class = SampleTable

0 commit comments

Comments
 (0)