Mikkel Høgh schrieb: > I'm tinkering with a small newsletter management system for a client, > but I'm having trouble to figure out how to pass data around. > I use a simple form for both subscription and unsubscription - this > then goes to a method /form/email which processes the request and then > redirects to another page depending on actions taken and results > thereof. > > The problem is that I cannot figure out how to pass the email address > along - it would be nice if the end screen at /signup/success showed > the email address that we just signed up to confirm the end user that > he did in fact succeed. > > So how to pass it along - I guess one could stick '?email=%s' % email > onto the URL, but that is untidy and invites pranks or other malicious > behavior. Is there a better way to do it?
You can instead replace the rendered templalte. Passing tg_template in the returned dictionary pointing to the template you want. Alternatively, you could do the redirect as you do now, but also add a hash-value you computed from the email & some server-side key. Which would protect the url. Diez --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

