'Like :meth:`Flask.before_request` but for a blueprint.  This function
is only executed before each request that is handled by a function of
that blueprint.'

def before_request(self, f):

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