django-allauth installation的第一步后,我收到以下错误。
ImproperlyConfigured at /admin/
Error importing module django.contrib.messages.context_processors.messagesallauth.account.context_processors: "No module named messagesallauth.account.context_processors"
Request Method: GET
Request URL: http://localhost:8000/admin/
Django Version: 1.6.6
Exception Type: ImproperlyConfigured
Exception Value:
Error importing module django.contrib.messages.context_processors.messagesallauth.account.context_processors: "No module named messagesallauth.account.context_processors"
Exception Location: /home/miguelfg/workspace/python_environments/tdcp_observatorio/local/lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 40
Python Executable: /home/miguelfg/workspace/python_environments/tdcp_observatorio/bin/python2.7
Python Version: 2.7.3
Python Path:
['/home/miguelfg/workspace/projects/python/tdcp_observatorio',
'/home/miguelfg/workspace/projects/python/tdcp_observatorio',
'/home/miguelfg/workspace/python_environments/tdcp_observatorio/lib/python2.7',
'/home/miguelfg/workspace/python_environments/tdcp_observatorio/lib/python2.7/plat-linux2',
'/home/miguelfg/workspace/python_environments/tdcp_observatorio/lib/python2.7/lib-tk',
'/home/miguelfg/workspace/python_environments/tdcp_observatorio/lib/python2.7/lib-old',
'/home/miguelfg/workspace/python_environments/tdcp_observatorio/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/home/miguelfg/workspace/python_environments/tdcp_observatorio/local/lib/python2.7/site-packages',
'/home/miguelfg/workspace/python_environments/tdcp_observatorio/local/lib/python2.7/site-packages/PIL']
Server time: Wed, 3 Sep 2014 12:29:34 +0200
我已完成所有安装步骤,包括syncdb或migrate命令,直到登录django管理界面并添加网站和社交应用程序。
我的部分设置文件:
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static',
'django.core.context_processors.request',
'django.contrib.messages.context_processors.messages'
# allauth specific context processors
"allauth.account.context_processors.account",
"allauth.socialaccount.context_processors.socialaccount",
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'custom_middleware.memory.MemoryUsageMiddleware',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
...
'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.google',
)
SITE_ID = 1
...
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
我在另一个项目中使用allauth并且我从来没有得到过这个。非常欢迎任何帮助: - )