'Works like :meth:`record` but wraps the function in another
function that will ensure the function is only called once.  If the
blueprint is registered a second time on the application, the
function passed is not called.'

def record_once(self, func):

    def wrapper(state):
        if state.first_registration:
            func(state)
    return self.record(update_wrapper(wrapper, func))
