基本上复制了本教程
http://peterhudec.github.io/authomatic/examples/django-simple.html
然后我使用python manage.py runserver
启动服务器(在Win 8中使用cmd提示符)。本地服务器似乎设置得很好。
但是一旦我尝试加载页面,它就会抛出这个错误:
ImportError at /
No module named google.appengine.api
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.6.5
Exception Type: ImportError
Exception Value:
No module named google.appengine.api
Exception Location: C:\Python27\lib\site-packages\authomatic\providers\gaeopenid.py in <module>, line 29
Python Executable: C:\Python27\python.exe
Python Version: 2.7.7
Python Path:
['C:\\Users\\darkace\\Documents\\2013 - 2014\\Python\\Django\\example',
'C:\\windows\\SYSTEM32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages']
Server time: Mon, 25 Aug 2014 20:14:34 +0100
是否缺少模块的问题(如果需要,我需要哪些?),或者我是否需要安装/运行app引擎,或者我的设置是否需要与Windows不同?
不太确定我要做的是说实话
答案 0 :(得分:2)
您正在使用this provider,因此您需要安装appengine SDK,或更改provider。
在django示例中,作者在此行中引用了Google提供商:
from authomatic.providers import oauth2, oauth1, openid, gaeopenid
删除gaeopenid引用并运行