我使用django-facebook- https://github.com/tschellenbach/Django-facebook进行身份验证。然而,我无法获得登录重定向来正确配置。
文档中说使用以下代码使重定向工作
<form action="{% url 'facebook_connect' %}?facebook_login=1" method="post">
<input type="hidden" value="{{ request.path }}" name="next" />
<input type="hidden" value="{{ request.path }}" name="register_next" />
<input type="hidden" value="{{ request.path }}" name="error_next" />
{% csrf_token %}
<input onclick="F.connect(this.parentNode); return false;" type="image" src="{{ STATIC_URL}}django_facebook/images/facebook_login.png" />
</form>我使用与上面相同的代码,但是登录总是重定向到
http://localhost:8000/#_=_ 发布于 2014-03-01 02:28:41
看一看
LOGIN_REDIRECT_URL默认值:'/accounts/profile/‘
当contrib.auth.login视图未获取下一个参数时,在登录后重定向请求的URL。
https://docs.djangoproject.com/en/1.6/ref/settings/https://stackoverflow.com/questions/22102200
复制相似问题