コード例 #1
0
    def getSessionKeys(self, request):
        """Get websafe keys for all sessions"""
        # Query all sessions for thier websafe keys
        items = []
        query = Session.query()
        for sess in query.fetch():
            items.append([sess.sessionName, sess.key.urlsafe()])

        # Create and send message with all keys and names
        keys = []
        wsk = SessionKeys()
        for i in items:
            temp = SessionKeyQuery(name=i[0], key=i[1])
            keys.append(temp)
        wsk.items = keys
        wsk.check_initialized()
        return wsk
コード例 #2
0
ファイル: conference.py プロジェクト: wangand/ud858
    def getSessionKeys(self, request):
        """Get websafe keys for all sessions"""
        # Query all sessions for thier websafe keys
        items = []
        query = Session.query()
        for sess in query.fetch():
            items.append([sess.sessionName, sess.key.urlsafe()])

        # Create and send message with all keys and names
        keys = []
        wsk = SessionKeys()
        for i in items:
            temp = SessionKeyQuery(name=i[0], key=i[1])
            keys.append(temp)
        wsk.items = keys
        wsk.check_initialized()
        return wsk
コード例 #3
0
    def getWishlists(self, request):
        """Get all wishlists"""
        # Query all sessions for thier websafe keys
        items = []
        query = Wishlist.query()
        for wish in query.fetch():
            temp = wish.key.parent().get().displayName
            items.append([temp, wish.key.urlsafe()])

        # Create and send message with all keys and names
        keys = []
        wsk = SessionKeys()
        for i in items:
            temp = SessionKeyQuery(name=i[0], key=i[1])
            keys.append(temp)
        wsk.items = keys
        wsk.check_initialized()
        return wsk
コード例 #4
0
ファイル: conference.py プロジェクト: wangand/ud858
    def getWishlists(self, request):
        """Get all wishlists"""
        # Query all sessions for thier websafe keys
        items = []
        query = Wishlist.query()
        for wish in query.fetch():
            temp = wish.key.parent().get().displayName
            items.append([temp, wish.key.urlsafe()])

        # Create and send message with all keys and names
        keys = []
        wsk = SessionKeys()
        for i in items:
            temp = SessionKeyQuery(name=i[0], key=i[1])
            keys.append(temp)
        wsk.items = keys
        wsk.check_initialized()
        return wsk