Ejemplo n.º 1
0
    def post(self):
        accountid = self.session.get('accountid')
        account = Account.get_by_accountid(accountid)
        if 1 != account.mod:
            return

        testcode = self.request.get('testcode')
        d = json.loads(testcode)
        assert (d)
        det = Story.api_index(d['lang'])
        self.redirect(self.request.url + 'input?result=' + str(det))
Ejemplo n.º 2
0
	def post(self):
		accountid = self.session.get('accountid')
		account = Account.get_by_accountid(accountid)
		if 1 != account.mod:
			return

		testcode = self.request.get('testcode')
		d = json.loads(testcode)
		assert(d)
		det = Story.api_index(d['lang'])
		self.redirect(self.request.url + 'input?result='+str(det))
Ejemplo n.º 3
0
def test_story_index():
    for lang in conftest.langs():
        det = Story.api_index(lang)
        assert True == det['success']
Ejemplo n.º 4
0
def test_story_index():
	for lang in conftest.langs():
		det = Story.api_index(lang)
		assert True == det['success']
Ejemplo n.º 5
0
 def get(self):
     self.response.headers['Content-Type'] = 'application/json'
     lang = self.request.get('lang')
     ret = Story.api_index(lang)
     self.response.headers['Content-Type'] = 'application/json'
     self.response.out.write(json.dumps(ret))
Ejemplo n.º 6
0
	def get(self):
		self.response.headers['Content-Type'] = 'application/json'
		lang = self.request.get('lang')
		ret = Story.api_index(lang)
		self.response.headers['Content-Type'] = 'application/json'
		self.response.out.write(json.dumps(ret))