mwarkentin/django-watchman — pull request #12 by kezabelle (2014-04-01 12:14:45+00:00)
Title: First pass at allowing custom checkers.

Would fulfil #3

Should, in theory, support Django 1.4.2 (introduced the vendored `six` library) through to 1.7+

Usage in settings is:
```
WATCHMAN_CHECKERS = (
'module.path.to.callable',
'another.module.path.to.callable',
)
```

Checkers now have the same contract as context processors: they consume a `request` and return a `dict` whose keys are applied to the JSON response:

```
def my_checker(request):
return {'x': 1}
```

In the absence of any checkers, a 404 is thrown, which is then handled by the `json_view` decorator.

Only a subset of checks may be run, by passing `only_check=module.path.to.callable&only_check=...` in the request URL. Only the callables given in querystring, which are in the `WATCHMAN_CHECKERS` should be run, eg:
```
curl -XGET http://127.0.0.1:8080/_is_app_responding/?only_check=watchman.views.caches_status
```