Hi
!
> I must login a user in my site than redirect to another site with 2
> parameters via post method.
> It's possible do that in my registration view?
This is not how a redirect works. If your view returns a
HttpResponseRedirect, Django sends a HTTP 302 code back to the browser 
along with the new URL. The browser of the user then requests the new URL.

The only way you could force a POST, would be to return a HTML page with
a hidden Form and some JavaScript to submit it automatically.

Why do you absolutely want to POST something? I hope 'parameter2' is not
something like 'authenticated', because that would be really really bad
securitywise. Just because you can't manipulate POST parameters through
URLs doesn't mean they are save to hide secrets.

> my example code:
> 
> if request.POST:
>         redirect_to = settings.REDIRECT_URL
>         errors = manipulator.get_validation_errors(request.POST)
>         if not errors:
>             from django.contrib.auth import login
>             login(request, manipulator.get_user())
>             request.session.delete_test_cookie()
>             post_data = {
>                 'parameter1': request.user.id,
>                 'parameter2': 'yes'
>                 }
>             #Redirect to another site with post_data parameter
>             # ????
>             # a simple redirect without parameter return
> HttpResponseRedirect(redirect_to)
>     else:
>         errors = {}
> 
> I tried with httplib e urllib but with no results....
> 
> Thanks in advance...
> Marco
> 
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
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