Juanvulcano
Juanvulcano

Reputation: 1396

MultiValueDictKeyError - Passing GET parameter

I'm using django allauth.

All my users should have access to an url that is generated dynamically. Ex: www.example.com/uuid/

From this page they should be able to login with Soundcloud and should be redirected to this page after connecting.

I am using the following to get the previous link but I am receiving a good url in html but is empty on 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']

Upvotes: 1

Views: 216

Answers (1)

YPCrumble
YPCrumble

Reputation: 28722

You have a typo in your url - it should be:

href="/accounts/soundcloud/login?process=login&next={{request.path}}"

Notice the & instead of the second ?.

Upvotes: 1

Related Questions