Skip to content

Commit

Permalink
No need to search for collection name and fix page size
Browse files Browse the repository at this point in the history
  • Loading branch information
medihack committed Jan 25, 2024
1 parent 5e03edc commit 2e12daf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ <h4 class="mb-3">Collections</h4>
</div>
{% endblock heading %}
{% block content %}
<div>{% crispy filter.form %}</div>
{% include "collections/_collection_list.html" %}
{% endblock content %}
6 changes: 3 additions & 3 deletions radis/collections/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 2e12daf

Please sign in to comment.