Multiple login: <type 'exceptions.TypeError'> __init__() got multiple values for keyword argument 'signals'

117 views
Skip to first unread message

Alec Taylor

unread,
Aug 20, 2012, 2:48:01 PM8/20/12
to web...@googlegroups.com
I followed the tutorial exactly, except used the Facebook login form rather than the RPX (Janrain) one: http://web2py.com/books/default/chapter/29/9#Other-login-methods-and-login-forms

Error ticket: http://jsfiddle.net/AlecTaylor/PVGFM/show/light/ 

How do I get a "double login" form?

Thanks for all information,

Alec Taylor

Alec Taylor

unread,
Aug 22, 2012, 6:11:08 AM8/22/12
to web...@googlegroups.com
*bump*
> --
>
>
>

Anthony

unread,
Aug 22, 2012, 10:53:50 AM8/22/12
to web...@googlegroups.com
auth.settings.login_form = ExtendedLoginForm(request, auth, facebook_login , signals=['token'])

ExtendedLoginForm() does not take request as the first argument. "signals" is the third argument, so it is seeing facebook_login as the "signals" argument, and of course, you also have an additional "signals" argument, hence the error. Change to:

auth.settings.login_form = ExtendedLoginForm(auth, facebook_login , signals=['token'])

Anthony

Anthony

unread,
Aug 22, 2012, 10:56:21 AM8/22/12
to web...@googlegroups.com
I just corrected this in the book.

Anthony

Alec Taylor

unread,
Aug 22, 2012, 10:51:31 PM8/22/12
to web...@googlegroups.com
Thanks, but unfortunately that didn't work.

Error ticket: http://jsfiddle.net/AlecTaylor/nNS5d/show/light
> --
>
>
>

Anthony

unread,
Aug 22, 2012, 11:09:37 PM8/22/12
to web...@googlegroups.com
I see, you're using the FaceBookAccount example from the Access Control chapter. I don't think that example code will work as is with ExtendedLoginForm, which requires the alternate login object to have a login_form() method. You'll probably have to implement a login_form() method for the class.

Anthony

Alec Taylor

unread,
Aug 22, 2012, 11:14:10 PM8/22/12
to web...@googlegroups.com
What would such a `login_form()` require?
> --
>
>
>

Anthony

unread,
Aug 23, 2012, 12:59:12 AM8/23/12
to web...@googlegroups.com
On Wednesday, August 22, 2012 11:14:10 PM UTC-4, Alec Taylor wrote:
What would such a `login_form()` require?

Not sure. Maybe look at the code in extended_login_form.py and rpx_account.py for hints.

Anthony 
Reply all
Reply to author
Forward
0 new messages