Python ';型号选项';对象没有属性';本地多对多';
我正在尝试将Django项目迁移到GAE(谷歌应用程序引擎) 问题是我在尝试登录时发现此错误:Python ';型号选项';对象没有属性';本地多对多';,python,django,google-app-engine,authentication,django-nonrel,Python,Django,Google App Engine,Authentication,Django Nonrel,我正在尝试将Django项目迁移到GAE(谷歌应用程序引擎) 问题是我在尝试登录时发现此错误: 'ModelOptions' object has no attribute 'local_many_to_many' 验证错误的行: user = authenticate(username=uName,password=uPass) 部分代码: if request.method == 'POST': if request.POST['submit'] == 'Login':
'ModelOptions' object has no attribute 'local_many_to_many'
验证错误的行:
user = authenticate(username=uName,password=uPass)
部分代码:
if request.method == 'POST':
if request.POST['submit'] == 'Login':
postDict = request.POST.copy()
lForm = LoginForm(postDict)
if (lForm.is_valid()):
uName = request.POST['username']
uPass = request.POST['password']
user = authenticate(username=uName,password=uPass)
if user is not None:
if user.is_active:
login(request,user)
return HttpResponseRedirect(next)
else:
message = 'Account Deactivated'
跟踪:
['/Users/xavicolomer/Dropbox/projects/workspace2/test',
'/Users/xavicolomer/Dropbox/projects/workspace2/test/django.zip',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/antlr3',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/django_0_96',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/fancy_urllib',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/ipaddr',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/webob',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/yaml/lib',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/simplejson',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/graphy',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine',
'/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
'/Library/Python/2.6/site-packages',
'/usr/share/django/django-trunk',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode']
您是否正在使用django Nonl提供的stock auth应用程序?它不起作用,因为它需要连接。安装后一切正常。一些额外的细节可能会有所帮助。请包括完整的堆栈跟踪、身份验证方法定义,以及任何包含本地多对多的模型定义。仔细看,我看到了未来可能出现的错误,我使用的是python2.6,而不是Drew Sears所说的2.5和django 0.96,其他信息会很好。同时,Waldemar在这个论坛上的建议可能对你有用:谢谢你的回复。问题是这个链接至少有2年了,我已经在使用Django non-rel项目了。那么你应该用Django non-rel标记它。你的错误与vanilla Django无关。