I'm trying to use my own forms for Identity.
As ToscaWidgets concatenates the named of nested form widgets by dots,
the request looks like:
/login?login.user=user&login.pass=pass&login.submit=Login
Unfortunately (at least in this case), TurboGears seems to use
formencode.variabledecode.variable_decode to create a nested dict out
of the request params.
The params therefore are:
{'login': {'user': 'user', 'pass': 'pass', 'submit': 'Login'}}
But Identity cannot handle nested request params.
See turbogears.identity.identity_from_form:
submit= params.pop(self.submit_button_name, None)
That, of course, won't work when self.submit_button_name is
"login.submit", because no such key exists.
Instead the value is found in params['login']['submit'].
A simple fix would be to use this as the first line in
identity_from_form:
params =
formencode.variabledecode.variable_encode(cherrypy.request.params)
I don't think that it should have negative side effects.
What do you think?
Someone wants so issue a bug ticket for that?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---