Exemplo n.º 1
0
def list_by_user(uid, since=None, size=10):
    not_empty(uid)
    cond = dict(uid=uid)
    r, lst = m_page(TName, since, size, **cond)
    arr = []
    for item in lst:
        try:
            r, v = m_info(T_ACCOUNT, item['uid'])
            if r: item['user'] = v['username']
            r, v = m_info(T_POST, item['pid'])
            if r: item['title'] = v['body']
            arr.append(item)
        except Exception as e:
            pass

    return r, arr
Exemplo n.º 2
0
def list_by_user(uid,since=None,size=10):
    not_empty(uid)
    cond = dict(uid=uid)
    r,lst = m_page(TName,since,size,**cond)
    arr = []
    for item in lst:
        try:
            r,v = m_info(T_ACCOUNT,item['uid'])
            if r:item['user'] = v['username']
            r,v = m_info(T_POST,item['pid'])
            if r:item['title'] = v['body']
            arr.append(item)
        except Exception as e:
            pass

    return r,arr
Exemplo n.º 3
0
def info(_id):
    return m_info(TName,_id)