用tastypie写了一个小api,包括UserRsource,可是当用户登录时:
curl --dump-header - -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data '{"username":"myname","password":"mypassword"}' http://localhost:8000/api/v1/user/login/
总是回复:
HTTP/1.0 501 NOT IMPLEMENTED
Date: Fri, 17 Apr 2015 00:23:32 GMT
Server: WSGIServer/0.1 Python/2.7.6
Vary: Accept
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=utf-8
不清楚什么问题,求解答,跪谢