예제 #1
0
    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
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')