2009/2/16 Mike <migue...@gmail.com>: > > Hi all, > > I m not familiar with django and I have found several problems trying > to sent a httpresponse with post parameters. I would like to return an > httpresponse (or httpredirect) to a new url with the request > parameters via post. > > Could anybody help me? > Thank you in advance, > Miguel > > I have defined a new view: > > def prueba(request, seccion): > if request.POST: > new_data = request.POST.copy() > > [get all the parameters] > [send a mail if correct] > > > response = HttpResponse ("newUrl") > #¿POST? > return HttpResponseRedirect(response) >
After a post you should use a HttpResponseRedirect(url). If you need to have access to the post parameters an option is to save them in a session, or encode them in the url itslef. Hope it helps! -- Antoni Aloy López Blog: http://trespams.com Site: http://apsl.net --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---