On Oct 16, 5:35 am, Divan Roulant <[EMAIL PROTECTED]> wrote: > Hello, > > I loose request data when I call a view with reverse from a previous > view. Here is what I do: [snip] > Is request data supposed to follow or is it normal to loose it? Is > there another way to preserve request data between consecutive views?
To understand your problem you need to understand what HttpResponseRedirect() is doing. When you return that object, your server sends the browser a 302 status code. A 302 tells the browser the desired page can be found under the new (temporary) URL you specify. The browser then requests the new URL as a GET. It does not resend any GET or POST data sent to the original URL. If you want to pass some parameters to that second view, you can put them on the URL you send in your response-redirect. Something like: return HttpResponseRedirect("/mysite/secondview/?foo=%(foo)s&bar=% (bar)s") % request Or you could store the data in the user session. Or you could just do your work in the first view. ;-) doug. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---