From 2e12daf74ae5ec47178115126c88ecb5f05dd064 Mon Sep 17 00:00:00 2001 From: Kai Schlamp Date: Thu, 25 Jan 2024 13:35:46 +0000 Subject: [PATCH] No need to search for collection name and fix page size --- .../collections/templates/collections/collection_list.html | 1 - radis/collections/views.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/radis/collections/templates/collections/collection_list.html b/radis/collections/templates/collections/collection_list.html index da7449bc..ee6d17cf 100644 --- a/radis/collections/templates/collections/collection_list.html +++ b/radis/collections/templates/collections/collection_list.html @@ -14,6 +14,5 @@

Collections

{% endblock heading %} {% block content %} -
{% crispy filter.form %}
{% include "collections/_collection_list.html" %} {% endblock content %} diff --git a/radis/collections/views.py b/radis/collections/views.py index 5282631f..d51f27d3 100644 --- a/radis/collections/views.py +++ b/radis/collections/views.py @@ -11,9 +11,8 @@ from django.urls import reverse_lazy from django.views.generic import CreateView, DeleteView, ListView, UpdateView, View from django.views.generic.detail import SingleObjectMixin -from django_filters.views import FilterView from django_htmx.http import HttpResponseClientRefresh, trigger_client_event -from django_tables2 import SingleTableMixin +from django_tables2 import SingleTableView from radis.core.mixins import PageSizeSelectMixin from radis.core.types import AuthenticatedHttpRequest @@ -31,11 +30,12 @@ class AnnotatedCollection(Protocol): has_report: bool -class CollectionListView(LoginRequiredMixin, SingleTableMixin, PageSizeSelectMixin, FilterView): +class CollectionListView(LoginRequiredMixin, SingleTableView): request: AuthenticatedHttpRequest model = Collection table_class = CollectionTable filterset_class = CollectionFilter + paginate_by = 30 def get_template_names(self) -> list[str]: if self.request.htmx: