From 7ba4ec7d83bfa57ead00bc3447f26d00bee6de4b Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 14 Aug 2020 22:47:45 +0200 Subject: [PATCH] Remove snippet chooser autocomplete hack After the last Wagtail update the hack seems no longer to work. Remove it. --- ...snippets-chooser-to-use-autocomplete.patch | 29 ------------------- 1 file changed, 29 deletions(-) delete mode 100644 patches/hack-snippets-chooser-to-use-autocomplete.patch diff --git a/patches/hack-snippets-chooser-to-use-autocomplete.patch b/patches/hack-snippets-chooser-to-use-autocomplete.patch deleted file mode 100644 index c2de5b9..0000000 --- a/patches/hack-snippets-chooser-to-use-autocomplete.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 740a083bf5879e37a35e510e1da789cc441040d8 Mon Sep 17 00:00:00 2001 -From: Donald Buczek -Date: Tue, 19 Nov 2019 15:27:16 +0100 -Subject: [PATCH] Hack snippets chooser to use autocomplete - -Users wanted to have partial search when Contacts are selected by the -Chooser. The Chooser doesn't have the feature to use partial matches and -our postgres_search doesn't support it in its search() method anyway. -Try to get away with changing the Chooserd to use autocomplete(). ---- - lib/python3.7/site-packages/wagtail/snippets/views/chooser.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/python3.7/site-packages/wagtail/snippets/views/chooser.py b/lib/python3.7/site-packages/wagtail/snippets/views/chooser.py -index 7c93edd..66ece97 100644 ---- a/lib/python3.7/site-packages/wagtail/snippets/views/chooser.py -+++ b/lib/python3.7/site-packages/wagtail/snippets/views/chooser.py -@@ -35,7 +35,7 @@ def choose(request, app_label, model_name): - search_query = search_form.cleaned_data['q'] - - search_backend = get_search_backend() -- items = search_backend.search(search_query, items) -+ items = search_backend.autocomplete(search_query, items) - is_searching = True - - else: --- -2.26.2 -