Example #1
0
def getUserFavorite(userid):
    result=list()
    if userid<=0:
        return None
    else:
        from models import getUserFavioritePic
        from enrichlist import UserContent, richUserPictures
        favioriteList=getUserFavioritePic(userid)
        if favioriteList is not None:
            content = richUserPictures(favioriteList,userid)
            feeds=generateFeeds(content.pics)
            result.extend(feeds)
    return result
Example #2
0
def getUserFavorite(userid):
    result=list()
    if userid<=0:
        return None
    else:
        from models import getUserFavioritePic
        from enrichlist import UserContent, richUserPictures
        favioriteList=getUserFavioritePic(userid)
        if favioriteList is not None:
            content = richUserPictures(favioriteList,userid)
        for pic in content.pics:
            feed = dict(picid=pic.pic_id, picuid=pic.pic_uid, username=pic.pic_userName, url=pic.pic_url, time=pic.pic_time, comments=pic.commentList, likeCount=pic.likeCount, liked=pic.liked)
            result.append(feed)
    return result