コード例 #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
ファイル: home.py プロジェクト: xiaojunchan/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)
コード例 #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)