Closed guruofgentoo closed 3 years ago
@guruofgentoo can you give me an example of this?
Something like https://github.com/level12/keg-elements/blob/86cfe0e7168b5c2a1e20ffc854569fc8375fe12b/kegel_app/extensions.py#L45. We'd probably want RequestArgsLoader, RequestFormLoader, and WebSessionLoader, in that order.
Loaders can be defined on the manager class or passed into the constructor.
@guruofgentoo please confirm the commit just above is what you want.
If this is a good default, should that be what we have upstream?
I think both request-related loaders should come before the session. That affects the precedence, i.e. if an arg is in a form post, the posted arg value should override something in the session store.
I wanted to give our keg apps a chance to support this before it goes upstream in webgrid as the default. Post will become the default target from the grid header, and that's breaking if the views don't support that method (which, traditionally, our grid views have not). I think I've documented that in webgrid, with the intention to make the change whenever we want to move to 0.5 there.
Thanks. I meant to do it the way you specified the first time. :o)
Newer webgrid, keg-elements, and keg-auth all support posts from the grid header. But, these are enabled conditionally based on the grid extension's args loaders.
Just need to add
RequestFormLoader
to the list.