Roger Demetrescu schrieb:
 > (just noticed cito == Christoph  :))

Yes, and isinstance(cito, Chris) :)

> Ah, one question: does this decorator require any change in tg.url or
> any other internal tg code?

No, the pass_hidden decorator just patches everything, I did not change 
any turbogears code. Instead of the usual tg variable, the template gets 
a patched tg variable where all attributes work the same, except tg.url 
which adds the hidden parameters.

But I found that "pass_hidden" does not work so smoothly as "recollect". 
One problem is that the urls in my grid are not produced in the template 
using tg.url, but they are produced by the grid column getter function 
outside of the template, so they don't use my patched url function. On 
the other hand, links that shouldn't pass the hidden variables, such as 
the logout link, now include the hidden variables, because they are 
created by e.g. the master template, but the hidden variable are not 
expected for these links.

Maybe I should think about writing another decorator "pass_referer" 
which makes use of the HTTP Referer header. But I'm not sure how 
reliable that header is.

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to