回溯错误:Django字典

时间:2015-04-17 01:40:34

标签: python django facebook

我在Django项目上测试了facebook SDK并且弹出了这个错误,这里是追溯:

http://dpaste.com/3VCMYEC

这是与该网站有关的urls.py。

def facebook(request):

    '''A sample application that will publish a status update after going into the login process using the Javascript SDK '''

    yourappid = XXXXXXXXXXXXXXXXXX

    return render(request, 'hackathon/facebook.html', yourappid)

1 个答案:

答案 0 :(得分:1)

yourappid必须是字典对象。

yourappid = XXXXXXXXXXX
return render(request, 'hackathon/facebook.html', {'id': yourappid})

URL dispatcher Docs