Beispiel #1
0
    def get(self):
        self.response.headers['Content-Type'] = 'application/json'
        self.response.headers['Cache-Control'] = "private, max-age=0"

        user = users.get_current_user()
        if user:
            ud = GetAppUserByEmail(user.email())
            if ud is not None:

                allUserRead = FeedData.query(
                    ReadData.app_username == ud.app_username).fetch()

                ##data = [{'url': read.feedUrl, 'readCount': read.readCount} for read in allUserRead]
                data = [{read.feedUrl: read.readCount} for read in allUserRead]

                self.response.out.write(str(json.dumps(data)))