Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
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)