On 11/30/06, luxagraf <[EMAIL PROTECTED]> wrote:
>
> Hello all I have a quick question, I just whipped up a custom
> manipulator for a contact form and, following the suggestion in the
> django docs, I'm using a
>
> HttpResponseRedirect("/contact/thankyou/")
>
> to get rid of the post data, but what I'd like to display at that
> redirect url is a copy of the message the user sent... but I can't
> figure out how to do that...
>
> is there a way to do something like this:
>
> HttpResponseRedirect("/contact/thankyou/"
> extra_context={'my_form_data': data_as_list})
>

You cannot do that because HttpResponseRedirect causes the browser to
navigate to another URL, it does not render anything at all. Think of
it as if the user manually typed the "/contact/thankyou/" URL in their
browser.

> note that I'm not storing the message, there is no model to query to,
> I thought of using a cookie, but the seems unnecessary...
>

Since you are not storing the data, then I can only thing of two
solutions. One is to pass that data on the query string of the
"thankyou" url, and get it from request.GET on that view.

The other option is, as you said, to use sessions.

I would personally use sessions, or store the data into the database.

Regards,
Jorge

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to