def create(uid,gid,content): isbigint(uid) isbigint(gid) istext(gid) summary = content[:150] return db.insert('notes', groupid=gid,userid=uid,notes=content,summary= summary,createdate=datetime.now(),status=1, _test=is_debug)
def update(i): isbigint(i.id) isbigint(i.groupid) istext(i.notes) i.summary = i.notes[:150] id = i.id db.update('notes',where='id=$id', groupid=i.groupid,notes=i.notes,summary=i.summary, vars=locals(),_test=is_debug)
def update(i): isbigint(i.id) isbigint(i.groupid) istext(i.notes) i.summary = i.notes[:150] id = i.id db.update('notes', where='id=$id', groupid=i.groupid, notes=i.notes, summary=i.summary, vars=locals(), _test=is_debug)
def create(uid, gid, content): isbigint(uid) isbigint(gid) istext(gid) summary = content[:150] return db.insert('notes', groupid=gid, userid=uid, notes=content, summary=summary, createdate=datetime.now(), status=1, _test=is_debug)