截至昨天,我有 django 1.4 和 pip 的最新活塞(我试图获得该版本,但我不知道如何)
当我尝试写入 rc.BAD_REQUEST 时,一切似乎都运行良好。当我尝试返回 rc.BAD_REQUEST 时,它工作正常。但是当我这样做时
resp = rc.CREATED
resp.write("Everything went fine!")
return resp
我收到以下错误
AttributeError at /car/api/model-lookup-model.json/allard/1956/
'HttpResponseServerError' object has no attribute '_is_string'
Request Method: GET
Request URL: http://127.0.0.1:8000/car/api/model-lookup-model.json/allard/1956/
Django Version: 1.4.1
Exception Type: AttributeError
Exception Value:
'HttpResponseServerError' object has no attribute '_is_string'
Exception Location: /Users/mo/Projects/pythonic/garenv/lib/python2.7/site-packages/piston/resource.py in __call__, line 184
Python Executable: /Users/mo/Projects/pythonic/garenv/bin/python
Python Version: 2.7.2
不太确定出了什么问题,我有相同的处理程序在不同的项目上工作正常,但它的 1.3 .. 有什么建议吗?