現在、私はソーシャル認証を検討している小さなプロジェクトに取り組んでいます (したがって、python-social-auth は素晴らしいです)。また、アセット (主に css) を処理するために django-pipeline を統合したいと考えています。
ソーシャル サインアップを実行する JS:
vm.doSocialAuth = function(provider) {
var authURL = '/auth/login/' + provider + '/?next=/auth/completed/';
$window.open(authURL, 500, 500);
};
ソーシャル認証は正常に機能します。
しかし、私がするとき:
INSTALLED_APPS += ['pipeline']
PIPELINE = {
# 'PIPELINE_ENABLED': True, # Missing this allows pipeline in debug mode
'STYLESHEETS': {
'main': {
'source_filenames': (
'css/cover.css',
),
'output_filename': 'css/main.css',
'extra_context': {
'media': 'screen,projection',
},
},
},
}
そして、ソーシャルサインインをしようとすると、この例外がトリガーされます:
ERROR Internal Server Error: /auth/complete/twitter/
Traceback (most recent call last):
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/django/core/handlers/base.py", line 149, in get_response
response = self.process_exception_by_middleware(e, request)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/django/core/handlers/base.py", line 147, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/apps/django_app/utils.py", line 54, in wrapper
return func(request, backend, *args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/apps/django_app/views.py", line 28, in complete
redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/actions.py", line 43, in do_complete
user = backend.complete(user=user, *args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/backends/base.py", line 41, in complete
return self.auth_complete(*args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/utils.py", line 229, in wrapper
return func(*args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/backends/oauth.py", line 182, in auth_complete
return self.do_auth(access_token, *args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/utils.py", line 229, in wrapper
return func(*args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/backends/oauth.py", line 193, in do_auth
return self.strategy.authenticate(*args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/strategies/django_strategy.py", line 96, in authenticate
return authenticate(*args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 74, in authenticate
user = backend.authenticate(**credentials)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/backends/base.py", line 82, in authenticate
return self.pipeline(pipeline, *args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/backends/base.py", line 85, in pipeline
out = self.run_pipeline(pipeline, pipeline_index, *args, **kwargs)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/backends/base.py", line 111, in run_pipeline
func = module_member(name)
File "/home/dosher/.venvsa/env_hrpro/lib/python2.7/site-packages/social/utils.py", line 55, in module_member
mod, member = name.rsplit('.', 1)
ValueError: need more than 1 value to unpack
python-social-auth ライブラリの問題なのか、django-pipeline の問題なのか分からないので、ここに投稿しました。
どんな助けでも大歓迎です。