瀏覽代碼

还原response响应格式内容

zhangdongming 2 年之前
父節點
當前提交
dce9c3453d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Object/ResponseObject.py

+ 2 - 2
Object/ResponseObject.py

@@ -1,5 +1,5 @@
-from django.shortcuts import HttpResponse
 import simplejson as json
 import simplejson as json
+from django.shortcuts import HttpResponse
 
 
 
 
 class ResponseObject(object):
 class ResponseObject(object):
@@ -258,4 +258,4 @@ class ResponseObject(object):
         if res is None:
         if res is None:
             res = {}
             res = {}
         result = self.formal(code, res)
         result = self.formal(code, res)
-        return HttpResponse(result, content_type='application/json,charset=utf-8')
+        return HttpResponse(result)