'Extend to make the ``Application`` object available on models at
``.app``.'

def __init__(self, app, *a, **kw):

    Postgres.__init__(self, *a, **kw)
    for model in MODELS:
        self.register_model(model)
        model.app = app
