Пример #1
0
    def get(self, user, code, point):
        sentence = Sentence.get_by_key_name(code)
        if not sentence:
            return self.response.out.write('NG')

        sentence.rate = int(point)
        sentence.put()
        return self.response.out.write('OK')
Пример #2
0
    def get(self, user, code):
        data = Sentence.get_by_key_name(code)
        if not data:
            self.redirect("/toeic800/new")

        t = env.get_template('toeic800_edit_sentence.html')
        tvars = {"user": user,
                 "sentence": data,
                 "name":'satoshi'}
        return self.response.out.write(t.render(T=tvars))