stephenmcd/mezzanine — pull request #492 by jerivas (2012-12-05 05:23:03+00:00)
Title: Optionally limit searches to specific models

The changes to the search view allow passing a URL parameter in the form app-name.ModelName to limit search results to a single model. This change is backwards compatible (current sites implementing the old search don't have to change anything), and new sites that wish to use it just have to add a new `` element to the search form.

First example: letting users choose the scope of their search; creating a simple Pages/Shop search toggle.

``` html

All
Pages
Shop

```

Second example: limiting the search scope to blog posts without user interaction, via hidden inputs. Drops right into Mezzanine's current search box.

``` html

```

Any third party model that inherits from Displayable can be passed as parameter.