'Like :meth:`Flask.endpoint` but for a blueprint.  This does not
prefix the endpoint with the blueprint name, this has to be done
explicitly by the user of this method.  If the endpoint is prefixed
with a `.` it will be registered to the current blueprint, otherwise
it\'s an application independent endpoint.'

def endpoint(self, endpoint):

    def decorator(f):
        def register_endpoint(state):
            state.app.view_functions[endpoint] = f
        self.record_once(register_endpoint)
        return f
    return decorator
