Exemplo n.º 1
0
Arquivo: api.py Projeto: AtanP/Atan
    def post(self):
        user = users.get_current_user()

        wordlist = WordList(owner=user)
        wordlist.put()

        self.response.headers['Content-Type'] = 'application/json'
        # FIXME: should use JSON printer
        self.response.out.write('{"ListId": "%s"}' % wordlist.key())
Exemplo n.º 2
0
    def post(self):
        user = users.get_current_user()

        wordlist = WordList(owner=user)
        wordlist.put()

        listid = wordlist.key()
        json = '{"ListId": "%s"}' % listid
        self.response.headers["Content-Type"] = "application/json"
        self.response.out.write(json)