Mo *_*abi 1 django django-piston
我有django 1.4和昨天从pip的最新活塞(我试图得到版本,但我不知道如何)
当我尝试写入rc.BAD_REQUEST时,一切似乎都工作得很好.当我尝试返回rc.BAD_REQUEST时它工作正常.但是当我这样做的时候
resp = rc.CREATED
resp.write("Everything went fine!")
return resp
Run Code Online (Sandbox Code Playgroud)
我收到以下错误
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
Run Code Online (Sandbox Code Playgroud)
我不太确定什么是错的,我有一个完全相同的处理程序在一个不同的项目,但它的1.3 ..任何建议吗?
在django-piston的源代码树中,这显然是固定的[1].您可以尝试使用pip安装它,如下所示:
pip install hg+https://bitbucket.org/jespern/django-piston
Run Code Online (Sandbox Code Playgroud)
[1] https://bitbucket.org/jespern/django-piston/changeset/7c90898072ce9462a6023bbec5d408ad097a362b
| 归档时间: |
|
| 查看次数: |
735 次 |
| 最近记录: |