Matt Wilson schrieb:
> My app has a lot of forms that are used to control what columns and
> rows show up in some reports.
> 
> I store the last-submitted choices into a cookie, and then on each
> report page, first I check in the query string, then I check in the
> cookie.
> 
> Anyhow, I find myself using both query string params, post params, and
> the cookie in my validator. Has anyone else done this?  I'm looking
> for warnings about stuff I should avoid.

Sounds like a reasonable approach to me. Do you store the values
directly in the cookie or do you use the cookie as a key to the cherrypy
session store? The latter approach is probably more flexible, since you
can store any Python object you want in the session and the session can
even persist across application restarts if you use a file or db-based
session storage.

    http://docs.turbogears.org/1.0/Sessions

Also, for accessing request dependent information in validators, you
might look at using the "state" argument, for better de-coupling of
validators and and controllers. For more info on this see

    http://docs.turbogears.org/1.0/ValidateDecorator#providing-state


HTH, Chris

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to