+ def get_result_template(self, result):
+ """Returns the template to be used for rendering the ``result``. For a search with slug ``google``, this would first try ``sobol/search/google/result.html``, then fall back on ``sobol/search/result.html``. Subclasses can override this by setting :attr:`result_template` to the path of another template."""
+ if self.result_template:
+ return loader.get_template(self.result_template)
+ return loader.select_template([
+ 'sobol/search/%s/result.html' % self.slug,
+ 'sobol/search/result.html'
+ ])
+