mozilla/socorro — pull request #2057 by AdrianGaudebert (2014-05-20 16:07:05+00:00)
Title: Fixes bug 1013308 - Replace all lists of Super Search fields with one central list

@peterbe r?

Here is the code I used to generate the JSON list of fields: https://gist.github.com/AdrianGaudebert/e640d570d7965d2f1a28 -- I edited a few things afterwards, permissions and choices. I don't think you need to bother reading it.

This is only the first step, see the tracker bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1013306

There are a few things I am concerned about in this PR:
* caching of the ``/supersearch/fields/`` service, as it should not change much. However, I would like to be able to clear the cache, because in the near future superusers will be able to modify that list at any time ;
* our models assumed that ``possible_params`` and ``required_params`` were static, which I changed because I need to generate those lists dynamically for the SuperSearch model. I'd like you to pay special attention to this change ;
* I am unsure about performances while adding that many calls to the middleware, just to create the SuperSearch model.