'Register a URL value preprocessor function for all view
functions in the application. These functions will be called before the
:meth:`before_request` functions.
The function can modify the values captured from the matched url before
they are passed to the view. For example, this can be used to pop a
common language code value and place it in ``g`` rather than pass it to
every view.
The function is passed the endpoint name and values dict. The return
value is ignored.'

@setupmethod
def url_value_preprocessor(self, f):

    self.url_value_preprocessors.setdefault(None, []).append(f)
    return f
