Hi Ken,
The problem with using Session is that the data will still be there when
you finish your “wizard". You have to manually delete it. It is state,
which is not good. Each request to your server should be an decoupled
operation. It’s ok to store in Session global state, like the current
language or user data, but I would not save something that belongs to a
“wizard”. What happens next time the same user runs the wizard? You have to
worry about that and makes your code complex.

You can encode the data form form1 view in the query string you redirect to
form2. It might be tricky since we are talking about formsets. You can use
urllib.urlencode, you pass a dict:
url = reverse('form2')
querystring = urllib.urlencode({ ... })
return HttpResponseRedirect('%s?%s' % (url, querystring))

Then in your form2 view you get the data from request.GET
key1 = request.GET[ ... ]

On Tue, May 5, 2015 at 1:48 PM, Ken Nguyen <etekni...@gmail.com> wrote:

> Hi Bernardo,
>
> I appreciate the feedback.  I've heard of many ways to pass data between
> methods in views such as session, write to a file, or use formwizard.  It
> is still a problem accessing the session from the "cleaned_data"?  This is
> my first time hearing about query string, care to explain or giving me an
> example of how it works?  In the meantime, I'll read up on it.
>
> Thanks,
> Ken
>
> P.S. - In some part of my code, you may notice the "location"parameter.
> You can ignore it or not include it in my code.  I was cut and paste so I
> didn't catch it.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/jnDIOT4dNqQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/181d8f1d-9728-400b-bac7-ddc205214dcc%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/181d8f1d-9728-400b-bac7-ddc205214dcc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Bernardo Brik

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO2FqvxN6eQfkpLh4HB1-aGrW%2BB%2B8BU3FkuaZaZrFsysmHQRxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to