Thanks Thomas,

I've replaced the SessionWizardView with a NamedUrlSessionWizard but it still 
doesn't work.
I've tried to redirect the user after the login to the base url (the one 
without steps), to the last step and to the done step but the wizard always 
restart at the beginning or is empty.


Il giorno 13/feb/2014, alle ore 17:10, Thomas Leo <t...@tomleo.com> ha scritto:

> 
> Sorry I meant to say NamedUrlSessionWizardView not NamedUrlWizardView
> 
> On Thursday, February 13, 2014 11:08:36 AM UTC-5, Thomas Leo wrote:
> >> when a user logs in and gets redirected to the order page the wizard 
> >> starts again from the beginning (loosing all the data inserted the first 
> >> time).
> 
> The issue is that in WizardView, triggering the get function causes the 
> session to reset. I would suggest that you switch from using a plain 
> SessionWizardView to a NamedUrlWizardView.
> 
> >> Can I keep/move the wizard session data from the anonymous user to the 
> >> logged user?
> 
> I believe that session data is only cleaned when you log out, however when 
> logging in you should not loose that data.
> 
> On Thursday, February 13, 2014 9:51:08 AM UTC-5, parnigot wrote:
> Hello fellow django users,
> 
> I'm using a form wizard (a very basic SessionWizardView) to create a simple 
> "order page".
> The four steps of the wizard must be accessible to both logged in and 
> anonymous users, but to complete an order the user must authenticate himself 
> (think something like an online shop where you can add what you want to the 
> basket but to complete an order you have to log in).
> 
> To accomplish this, in the wizard's done() method, I redirect anonymous users 
> to the login page with a ?next=/order-page/parameter.
> But this doesn't work very well, because when a user logs in and gets 
> redirected to the order page the wizard starts again from the beginning 
> (loosing all the data inserted the first time).
> 
> Can I keep/move the wizard session data from the anonymous user to the logged 
> user?
> 
> ---
> Best regards,
> e.p.
> 
> -- 
> 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/feda2bb8-031f-4875-919a-a0f65fa23502%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

e.p.

-- 
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/7E7BDEA7-EDB6-47DD-B8B2-2253C2C7AA9F%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to