我查看了活塞文档的相关部分,但它似乎只关注如何打开它,而不是它对客户的外观或如何测试它以验证它的工作。该示例似乎仅使用 HTTP Basic 和curl
. 最后,Ned Batchelder 的问题使它看起来像教程一样。谢谢。
问问题
5150 次
2 回答
15
我刚刚在http://blog.carduner.net/2010/01/26/django-piston-and-oauth/找到了一个教程。希望这会对某人有所帮助。
于 2010-03-27T13:28:05.133 回答
1
我做了本杰明戴尔;你在什么时候?无限循环?在这种情况下; 将此函数添加到 yourapp.api.views:
# Create your views here.
from django.shortcuts import render_to_response
from django.template import RequestContext
def request_token_ready(request, token):
error = request.GET.get('error', '')
ctx = RequestContext(request, {
'error' : error,
'token' : token
})
return render_to_response(
'piston/request_token_ready.html',
context_instance = ctx
)
并设置 settings.OAUTH_CALLBACK_VIEW = "api.views.request_token_ready"
于 2010-08-03T10:10:03.097 回答