mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-09 16:04:45 +00:00
Async search docs done
This commit is contained in:
parent
206a3e3732
commit
c4b5f09eac
1 changed files with 2 additions and 2 deletions
|
|
@ -154,9 +154,9 @@ The AJAX interface uses the same view as the normal HTML search, ``wagtailsearch
|
|||
|
||||
.. code-block:: python
|
||||
|
||||
WAGTAILSEARCH_RESULTS_TEMPLATE_AJAX = 'mirrorstage/includes/search_listing.html'
|
||||
WAGTAILSEARCH_RESULTS_TEMPLATE_AJAX = 'myapp/includes/search_listing.html'
|
||||
|
||||
You could provide a template in JSON format with extra properties, such as ``query.hits``, or render an HTML snippet that can go directly into your results ``<div>``. If you need more flexibility, such as multiple formats/templates based on differing requests, you can set up a custom search view.
|
||||
In this template, you'll have access to the same context variablies provided to the HTML template. You could provide a template in JSON format with extra properties, such as ``query.hits``, or render an HTML snippet that can go directly into your results ``<div>``. If you need more flexibility, such as multiple formats/templates based on differing requests, you can set up a custom search view.
|
||||
|
||||
Editor's Picks
|
||||
--------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue