コード例 #1
0
ファイル: viewsbase.py プロジェクト: reorx/remonitor
    def get_resp(self):
        data = dict(
                error = self.get_msg())

        resp = HttpResponse(_json(data),
                            status=self.code)
        return resp
コード例 #2
0
def render_api(data):
    json = _json(data)
    return HttpResponse(json, content_type='application/json')
コード例 #3
0
    def get_resp(self):
        data = dict(error=self.get_msg())

        resp = HttpResponse(_json(data), status=self.code)
        return resp
コード例 #4
0
ファイル: viewsbase.py プロジェクト: reorx/remonitor
def resp_json(dic):
    json = _json(dic)
    return HttpResponse(json, content_type='application/json')
コード例 #5
0
ファイル: render.py プロジェクト: reorx/PIGS
def render_json(request, dic):
    json = _json(dic)
    return HttpResponse(json, content_type='application/json')
コード例 #6
0
ファイル: viewsbase.py プロジェクト: kymo/fiction
def render_api(data):
    json = _json(data)
    return HttpResponse(json, content_type='application/json')