我正在使用django allauth。
我的所有用户都应该有权访问动态生成的网址。例如:www.example.com/uuid /
在此页面中,他们应该可以使用Soundcloud登录,并且应该在连接后重定向到此页面。
我使用以下内容获取上一个链接,但我在html中收到了一个好网址,但在django上是空的。
#Html
<a href="/accounts/soundcloud/login?process=login?next={{request.path}}" name="next" value="next" class="waves-effect waves-light btn-large" style="margin-bottom: 10px;">Download</a>
#adapter.py
class AccountAdapter(DefaultAccountAdapter):
def get_login_redirect_url(self, request):
#assert request.user.is_authenticated()
#pass
return request.GET['next']
答案 0 :(得分:1)
您的网址中有拼写错误 - 应该是:
href="/accounts/soundcloud/login?process=login&next={{request.path}}"
请注意&
而不是第二个?
。