Move Review Board's search to a SearchForm + generic SearchView
Review Request #9105 - Created July 31, 2017 and updated
This patch updates Review Board's
RBSearchView, which was previously
using Haystack's deprecated
SearchViewwith the generic version added
in 2.4 that builds on top of existing Django forms infrastructure. This
means that we now require a minimum version of 2.4.0 for Haystack.
The actual search code has been split out into a form that does the
actual searching. This will allow searches to be performed without
setting up a bunch of view rendering infrastructure that we won't need
each time (e.g., from the API).
Ran unit tests.
|Can you add unit tests to check for access to the search page under the standard conditions, and for when ...||Christian Hammond|
This looks really nice. Most of my comments are small doc/style issues.
Can you add unit tests to check for access to the search page under the standard conditions, and for when search is disabled?
This won't link right. Just say the parent form.
"If no filter is provided"
self.usergets accessed a lot, so let's remove the attribute lookup and pull it in as a local variable.
No blank line.
reviewboard.accountsis in the wrong place.
This sentence kinda ends strangely.
Can you add
, unusedto these?
There's something wrong here.
Make sure results with multiple pages are tested thoroughly.
Address most of Christian's issues; tests pending
Revision 2 (+360 -228)