'Like :meth:`Flask.after_request` but for a blueprint.  Such a function
is executed after each request, even if outside of the blueprint.'

def after_app_request(self, f):

    self.record_once((lambda s: s.app.after_request_funcs.setdefault(None, []).append(f)))
    return f
