controller_utils.py 228 Bytes
Newer Older
1 2 3 4 5 6 7
from gluon import current
import gluon.contrib.simplejson

def error_message(msg):
    res = {"success" : "false", "message" : msg}
    current.log.error(res)
    return gluon.contrib.simplejson.dumps(res, separators=(',',':'))