kopia lustrzana https://github.com/wagtail/wagtail
Merge branch 'kaedroho-page-chooser-wagtailsearch'
commit
89bc404a8a
|
@ -22,6 +22,7 @@ Changelog
|
|||
* Updated URLs within the admin backend to use namespaces
|
||||
* The `update_index` task now indexes objects in batches of 1000, to indicate progress and avoid excessive memory use
|
||||
* Added database indexes on PageRevision and Image to improve performance on large sites
|
||||
* Search in page chooser now uses Wagtail's search framework, to order results by relevance
|
||||
* Fix: Text areas in the non-default tab of the page editor now resize to the correct height
|
||||
* Fix: Tabs in "insert link" modal in the rich text editor no longer disappear (Tim Heap)
|
||||
* Fix: H2 elements in rich text fields were accidentally given a click() binding when put insite a collapsible multi field panel
|
||||
|
|
|
@ -54,6 +54,7 @@ Minor features
|
|||
* Updated URLs within the admin backend to use namespaces
|
||||
* The ``update_index`` task now indexes objects in batches of 1000, to indicate progress and avoid excessive memory use
|
||||
* Added database indexes on PageRevision and Image to improve performance on large sites
|
||||
* Search in page chooser now uses Wagtail's search framework, to order results by relevance
|
||||
|
||||
Bug fixes
|
||||
~~~~~~~~~
|
||||
|
|
|
@ -118,7 +118,7 @@ def search(request, parent_page_id=None):
|
|||
if search_form.is_valid() and search_form.cleaned_data['q']:
|
||||
pages = desired_class.objects.exclude(
|
||||
depth=1 # never include root
|
||||
).filter(title__icontains=search_form.cleaned_data['q'])[:10]
|
||||
).search(search_form.cleaned_data['q'], fields=['title'])[:10]
|
||||
else:
|
||||
pages = desired_class.objects.none()
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue