'Reformats the new Location (dest) using format_output_url and
sends the user to that location with the provided HTTP code.'

@classmethod
def redirect(cls, dest, code=302, preserve_extension=True):

    dest = cls.format_output_url((dest or '/'), preserve_extension=preserve_extension)
    response.status_int = code
    response.headers['Location'] = dest
