From: Daniel Axtens Date: Fri, 11 May 2018 17:00:44 +0000 (+1000) Subject: REST: Disable control for filtering patches by series in web view X-Git-Tag: v2.1.0-rc2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba5b66931ae014df4bf52e55754dab8dc8384d7c;p=thirdparty%2Fpatchwork.git REST: Disable control for filtering patches by series in web view As with the events view, creating and rendering the control for filtering patches by series creates a massive slowdown. It's a little sad not to be able to do this in the web UI as filtering patches by series does make sense, but hopefully people figure out you can still do it, just not from the web view. Signed-off-by: Daniel Axtens Signed-off-by: Stephen Finucane --- diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py index 7e818954..73353d90 100644 --- a/patchwork/api/filters.py +++ b/patchwork/api/filters.py @@ -168,7 +168,10 @@ class SeriesFilterSet(TimestampMixin, FilterSet): class CoverLetterFilterSet(TimestampMixin, FilterSet): project = ProjectFilter(queryset=Project.objects.all()) - series = BaseFilter(queryset=Project.objects.all()) + # NOTE(stephenfin): We disable the select-based HTML widgets for these + # filters as the resulting query is _huge_ + series = BaseFilter(queryset=Project.objects.all(), + widget=MultipleHiddenInput) submitter = PersonFilter(queryset=Person.objects.all()) class Meta: @@ -179,7 +182,10 @@ class CoverLetterFilterSet(TimestampMixin, FilterSet): class PatchFilterSet(TimestampMixin, FilterSet): project = ProjectFilter(queryset=Project.objects.all()) - series = BaseFilter(queryset=Series.objects.all()) + # NOTE(stephenfin): We disable the select-based HTML widgets for these + # filters as the resulting query is _huge_ + series = BaseFilter(queryset=Series.objects.all(), + widget=MultipleHiddenInput) submitter = PersonFilter(queryset=Person.objects.all()) delegate = UserFilter(queryset=User.objects.all()) state = StateFilter(queryset=State.objects.all())