On Aug 20, 7:14 am, Will Rocisky <[EMAIL PROTECTED]> wrote:
> I am actually making a sort of wizard in which all values have to be
> saved at the end.
> I want to pass a variable from one action to another after pressing
> 'Next' with HttpResponseRedirect

There's various ways. The easiest would be to simply append it to the
redirect URL as a GET parameter:
return HttpResponseRedirect('/new_url/?var=value')
and in the next view:
var = request.GET['var']

This obviously isn't secure, so if that matters you would be better
storing it in the session:
request.session['var']=value

Alternatively, you could look at how it's done in
django.contrib.formtools.wizard, where I believe the values are hashed
and stored in a hidden form field.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
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