예제 #1
0
파일: home.py 프로젝트: Magic347/rhinoceros
    def GET(self):
        last_users = users.last_users().list()
        last_image = image.get_last_image().list()

        #得到最新图片的上传者ID
        authorsID = []
        for u in last_image:
            authorsID += str(u.userID).split()

        #根据ID去用户表查找
        authors = []
        for i in xrange(len(authorsID)):
            authors += users.get_users_by_id(authorsID[i])

        #得到最新图片ID
        # img_ids = []
        # for i in last_image:
        #     img_ids += str(i.id).split()

        #得到最新图片的被喜欢数
        # count = []
        # for i in xrange(len(img_ids)):
        #     count += str(image.GetFavUserCount(img_ids[i]))

        return view.base(view.explore(last_users, last_image, authors), user, siteName)
예제 #2
0
파일: home.py 프로젝트: naoyeye/rhinoceros
    def GET(self):
        last_users = users.last_users().list()
        last_image = image.get_last_image().list()

        #得到最新图片的上传者ID
        authorsID = []
        for u in last_image:
            authorsID += str(u.userID).split()

        #根据ID去用户表查找
        authors = []
        for i in xrange(len(authorsID)):
            authors += users.get_users_by_id(authorsID[i])

        #得到最新图片ID
        # img_ids = []
        # for i in last_image:
        #     img_ids += str(i.id).split()

        #得到最新图片的被喜欢数
        # count = []
        # for i in xrange(len(img_ids)):
        #     count += str(image.GetFavUserCount(img_ids[i]))
        rights = None
        notification_results = None
        notification_num = None
        ntf_list = None
        ntf_posts = None
        ntf_users = None
        apply_log = {}

        return view.base(view.explore(last_users, last_image, authors), user, siteName, rights, ntf_list, notification_num, ntf_posts, ntf_users )
예제 #3
0
    def GET(self):
        last_users = users.last_users().list()
        last_image = image.get_last_image().list()

        #得到最新图片的上传者ID
        authorsID = []
        for u in last_image:
            authorsID += str(u.userID).split()

        #根据ID去用户表查找
        authors = []
        for i in xrange(len(authorsID)):
            authors += users.get_users_by_id(authorsID[i])

        #得到最新图片ID
        # img_ids = []
        # for i in last_image:
        #     img_ids += str(i.id).split()

        #得到最新图片的被喜欢数
        # count = []
        # for i in xrange(len(img_ids)):
        #     count += str(image.GetFavUserCount(img_ids[i]))

        return view.base(view.explore(last_users, last_image, authors), user,
                         siteName)
예제 #4
0
    def GET(self):
        last_users = users.last_users().list()
        last_image = image.get_last_image().list()

        #得到最新图片的上传者ID
        authorsID = []
        for u in last_image:
            authorsID += str(u.userID).split()

        #根据ID去用户表查找
        authors = []
        for i in xrange(len(authorsID)):
            authors += users.get_users_by_id(authorsID[i])

        #得到最新图片ID
        # img_ids = []
        # for i in last_image:
        #     img_ids += str(i.id).split()

        #得到最新图片的被喜欢数
        # count = []
        # for i in xrange(len(img_ids)):
        #     count += str(image.GetFavUserCount(img_ids[i]))
        rights = None
        notification_results = None
        notification_num = None
        ntf_list = None
        ntf_posts = None
        ntf_users = None
        apply_log = {}

        return view.base(view.explore(last_users, last_image,
                                      authors), user, siteName, rights,
                         ntf_list, notification_num, ntf_posts, ntf_users)