Commits

Anonymous committed 7d9bd26

Fix mime type for JSON responses

  • Participants
  • Parent commits 5c24758

Comments (0)

Files changed (3)

-recursive-include tw/yui/templates *
-recursive-include tw/yui/static *
+recursive-include tw2/yui/templates *
+recursive-include tw2/yui/static *

tw2/yui/samples.py

             twc.JSLink(modname=__name__, filename="static/sample-data.js"),
         ]
         data = 'YAHOO.example.Data.arrayStates'
-        responseSchema = {'fields ': ["state"]};
+        responseSchema = {'fields': ["state"]};

tw2/yui/widgets.py

 
     @classmethod
     def request(self, req):
-        resp = webob.Response(request=req, content_type="text/plain; charset=UTF8")
+        resp = webob.Response(request=req, content_type="application/json; charset=UTF8")
         resp.body = encoder.encode(self.ajax_request(req))
         return resp