我正在尝试通过 Tweepy 查看我的 Twitter 列表中的成员列表。当我尝试访问我的 django 应用程序中的页面时,我收到以下错误。但是当我尝试通过 shell 终端(manage.py shell)检查时,它会显示我列表中的成员。
我该如何解决这个问题?
TweepError at /list/
[{u'message': u'Sorry, that page does not exist', u'code': 34}]
Request Method: GET
Request URL: http://127.0.0.1:8000/list/
Django Version: 1.4
Exception Type: TweepError
Exception Value: [{u'message': u'Sorry, that page does not exist', u'code': 34}]
Exception Location: build\bdist.win32\egg\tweepy\binder.py in execute, line 168
Python Executable: C:\Python27\python.exe
Python Version: 2.7.3
Python Path: ['C:\\Python27\\Scripts\\crack',
'C:\\Python27\\lib\\site-packages\\django_social_auth-0.6.9-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\python_openid-2.2.5-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\oauth2-1.5.211-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\httplib2-0.7.4-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\tweepy-1.9-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\django_pagination-1.0.7-py2.7.egg',
'C:\\Python27\\lib\\site-packages\\django_imagekit-2.0.1-py2.7.egg',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27\\lib\\site-packages\\PIL']
Server time: Wed, 30 May 2012 10:07:07 +0100
意见
def listmem(request):
Users= api.list_members(owner=request.user, slug='map')
for User in Users:
print User
return render_to_response('listmember.html',{'Users': Users},context_instance=RequestContext(request))
模板
{% block content %}
{% for User in Users %}
<p> <img src={{ User.profile_image_url }} /> {{ User.screen_name}}<a> </p>
{% endfor %}
{% endblock %}