now tested in web2py v2.7.4