这是我的项目目录:
/handshakeapp:
templates/
__init__.py
admin.py
models.py
pipelines.py
views.py
/VKHandshake:
__init__.py
settings.py
urls.py
...
manage.py
这是settings.py
的一部分
这是handshakeapp/pipelines.py
:
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')
但每次我尝试使用Social Auth登录时,它都会重定向到/accounts/login/
。如果我从社交认证管道中删除'handshakeapp.pipelines.fill_extendeduser'
,它就会起作用。怎么了?在
问题出在
fill_extendeduser
函数中。它引发了一个例外,正如@omab所说:相关问题 更多 >
编程相关推荐