On Saturday January 17, 2009 05:29:35 you wrote:
> yes thank you it solves the problem by setting the "came_from" as an hidden
> input value in the form.

I'm glad to know that :)

> I am actually trying to find an elegant way to do the redirection. Do you
> think it would be possible to use a session variable than the came_from
> post value?

I would customize the RedirectingFormPlugin to find the URL to redirect to in 
a session variable, since right now it gets that URL from the GET parameter in 
question. For example, a quick & dirty solution is to:
 1.- Subclass RedirectingPluginForm.
 2.- Override the .identify method by adding the came_from variable to the 
environ and finally call its parent.

But if login fails then this GET variable will appear when the user is 
redirected back to the login form.

I would create a RedirectingFormPlugin-based plugin or use the repoze.who 
FormPlugin (instead of the redirecting one).

Gustavo Narea <http://gustavonarea.net/>.

Get rid of unethical constraints! Get freedomware:
Repoze-dev mailing list

Reply via email to