replace couchforms update handler with python equivalent