PythonSocial Auth Twitter平面页面

时间:2014-09-11 16:30:39

标签: python django python-social-auth django-flatpages

我试图允许我的Django网站上的用户使用Twitter登录,我使用python social auth。它在本地工作正常,但当我将其部署到我的服务器(AWS)时,我收到此错误:

Environment:


Request Method: GET
Request URL: http://54.164.233.178/login/twitter/?next=

Django Version: 1.6.5
Python Version: 2.7.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'django.contrib.sitemaps',
 'meddy1',
 'south',
 'django_google_maps',
 'social.apps.django_app.default')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  199.                 response = middleware_method(request, response)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/flatpages/middleware.py" in process_response
  10.             return flatpage(request, request.path_info)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/flatpages/views.py" in flatpage
  36.             url__exact=url, sites__id__exact=site_id)
File "/usr/local/lib/python2.7/dist-packages/django/shortcuts/__init__.py" in get_object_or_404
  113.         return queryset.get(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in get
  304.         num = len(clone)
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in __len__
  77.         self._fetch_all()
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in _fetch_all
  857.             self._result_cache = list(self.iterator())
File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in iterator
  220.         for row in compiler.results_iter():
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in results_iter
  713.         for rows in self.execute_sql(MULTI):
File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" in execute_sql
  786.         cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" in execute
  69.             return super(CursorDebugWrapper, self).execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" in execute
  53.                 return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/utils.py" in __exit__
  99.                 six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" in execute
  53.                 return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py" in execute
  124.             return self.cursor.execute(query, args)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py" in execute
  174.             self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py" in defaulterrorhandler
  36.     raise errorclass, errorvalue

Exception Type: ProgrammingError at /login/twitter/
Exception Value: (1146, "Table 'meddy2.django_flatpage' doesn't exist")

知道为什么会这样吗?我过去使用过flatpages,但现在不再使用了。我从代码中删除它并使用南方同步数据库。我也使用Facebook登录,工作正常。

0 个答案:

没有答案