This method should be in the app.py, and should be "registered' like jinja2.
Look: skysoccer/app.py Line: 8
And used like jinja, like that:
request.registry['mongo']