0
이 내 프로젝트의 디렉토리입니다 :장고와 파이썬 사회 인증 리디렉션
from models import ExtendedUser
def fill_extendeduser(strategy, details, user=None, is_new=False, *args, **kwargs):
if user and is_new:
user.extendeduser_set.create(user=user.get_username(), countingID=None, profilePic='http://localhost:8000/pic.png')
:
/handshakeapp:
templates/
__init__.py
admin.py
models.py
pipelines.py
views.py
/VKHandshake:
__init__.py
settings.py
urls.py
...
manage.py
이이 handshakeapp/pipelines.py
입니다 settings.py
SOCIAL_AUTH_PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details',
'handshakeapp.pipelines.fill_extendeduser'
)
의 일부입니다
하지만 Social Auth를 사용하여 로그인을 시도 할 때마다 /accounts/login/
으로 리디렉션됩니다. . SOCIAL_AUTH_PIPELINE에서 'handshakeapp.pipelines.fill_extendeduser'
을 제거하면 작동합니다. 뭐가 문제 야?
맞춤형 pipline에 코드를 추가 할 수 있습니까? 그것은 무엇을 반환합니까? –
@ TimmyO'Mahony 업데이트되었습니다. – michaeluskov
None 또는 HttpResponse –