我正在尝试在Google应用引擎项目上实施django-social-auth,但我不断收到错误消息:
raise NotImplementedError("The database backend only supports "
NotImplementedError: The database backend only supports count() queries.
主页面有效,但每次点击任何登录链接时都会收到错误。任何帮助将不胜感激!
错误的全文如下(我缩短了一些目录)。非常感谢您提前寻求帮助。
Environment:
Request Method: GET
Request URL: http://localhost:8080/login/google-oauth2/
Django Version: 1.4.3
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.auth',
'django.contrib.sessions',
'djangotoolbox',
'autoload',
'dbindexer',
'httplib2',
'openid',
'oauth2',
'social_auth',
'djangoappengine')
Installed Middleware:
('autoload.middleware.AutoloadMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\core\handlers\base.py" in get_response
188. response = middleware_method(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\contrib\sessions\middleware.py" in process_response
36. request.session.save()
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\contrib\sessions\backends\cached_db.py" in save
42. super(SessionStore, self).save(must_create)
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\contrib\sessions\backends\db.py" in save
51. session_key=self._get_or_create_session_key(),
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\contrib\sessions\backends\base.py" in _get_or_create_session_key
145. self._session_key = self._get_new_session_key()
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\contrib\sessions\backends\base.py" in _get_new_session_key
139. if not self.exists(session_key):
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\contrib\sessions\backends\cached_db.py" in exists
39. return super(SessionStore, self).exists(session_key)
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\contrib\sessions\backends\db.py" in exists
27. return Session.objects.filter(session_key=session_key).exists()
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\db\models\query.py" in exists
565. return self.query.has_results(using=self.db)
File "C:\Program Files (x86)\Google\google_appengine\lib\django-1.4\django\db\models\sql\query.py" in has_results
441. return bool(compiler.execute_sql(SINGLE))
File ".\app project directory\dbindexer\compiler.py" in execute_sql
24. return super(SQLCompiler, self).execute_sql(*args, **kwargs)
File ".\app project directory\djangotoolbox\db\basecompiler.py" in execute_sql
364. raise NotImplementedError("The database backend only supports "
Exception Type: NotImplementedError at /login/google-oauth2/
Exception Value: The database backend only supports count() queries.