def get(self): #self.response.headers['Content-Type'] = 'application/json' self.response.headers['Content-Type'] = 'text/javascript' outfd = self.response.out outfd.write('function getListings() {\n') outfd.write('return ') outfd.write(JsonListings.get()) outfd.write(';\n') outfd.write('}\n')
def get(self): JsonListings.invalidate() self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Invalidated JSON cache')