def info(self, request): """ The heart of the app, returning a JSON ecoded list of proc results. """ payload = dump_procs(self.loaded_procs) return HttpResponse(payload, content_type='application/json')
def info(self): """ The heart of the app, returning a JSON ecoded list of proc results. """ # do the JSON dumping ourselves to be able to handle datetimes nicely payload = dump_procs(self.loaded_procs).replace("</", "<\\/") self.set_header("Content-Type", "application/json; charset=UTF-8") self.write(payload) self.finish()
def info(id): """ The heart of the app, returning a JSON ecoded list of proc results. """ return Response(dump_procs(loaded_procs), mimetype='application/json')