[EMAIL PROTECTED] wrote:
(...)
> 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'}}
(...)
> 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 can file a bug ticket yourself, please go ahead.
IMHO, there should be a possibility to disable the variabledecode on a
by-function basis. Obviously, this is not possible with the current
implementation of NestedVariablesFilter as a CherryPy before_main filter. The
latter causes problems with unit tests too if you use testutils.call.
Therefore I already thought about moving the NestedVariablesFilter into the
expose function (did not investigated that one thoroughly though), making the
variable decoding a keyword parameter for expose (defaults to True in order to
preserve the current behavior). When the current filter is moved into a
decorator, your problem will vanish immediately.
Currently, I don't see any negative effects of doing this. If you file a
ticket,
we can move the discussion to the devel list and discuss a solution there.
fs
PS: Please send me a ping after you opened the ticket.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---