Added docs for result list template. Moved success/error handling into hooks on sobol...
[philo.git] / philo / contrib / sobol / __init__.py
index 74ca4f1..0458a83 100644 (file)
@@ -10,6 +10,13 @@ Settings
 :setting:`SOBOL_USE_EVENTLET`
        If :mod:`eventlet` is installed and this setting is ``True``, sobol web searches will use :mod:`eventlet.green.urllib2` instead of the built-in :mod:`urllib2` module. Default: ``False``.
 
+Templates
+---------
+
+For convenience, :mod:`.sobol` provides a template at ``sobol/search/_list.html`` which can be used with an ``{% include %}`` tag inside a full search page template to list the search results. The ``_list.html`` template also uses a basic jQuery script (``static/sobol/ajax_search.js``) to handle AJAX search result loading if the AJAX API of the current :class:`.SearchView` is enabled. If you want to use ``_list.html``, but want to provide your own version of jQuery or your own AJAX loading script, or if you want to include the basic script somewhere else (like inside the ``<head>``) simply do the following::
+
+       {% include "sobol/search/_list.html" with suppress_scripts=1 %}
+
 """
 
 from philo.contrib.sobol.search import *
\ No newline at end of file