FAQ
I'm writing a quite complex Wizard (lots of pages, lots of inputs), so I'd
like to add a Back button to it.

My first thought was just using a "history.back()" javascript call, but in
the previous form I had some inputs created with Javascript that get lost
if I just browse back, so I need to access the data stored in the Wizard.

I don't really care about keeping the data in the current step (although it
would be nice), but I need to access *all* the data of the previous step,
as it will be sent to the done() method of the wizard.

Any suggestions, please?

--
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+unsubscribe@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/6372176d-998b-406c-b72c-748475cd8b55%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Asad Jibran Ahmed at Feb 2, 2014 at 4:40 pm
    We had a similar requirement in one of our products. We solved it by assigning the user a unique transaction id when they start the process, and saving all data in a temp db (redis) until the user completed the process. And whenever the user accessed a page with the transaction id in the get params, the data was autofilled in the form.

    Maybe you can do something similar by saving data for each part of the wizard in a temp db under one key and using that to pre-populate the forms?

    Also, we used keys that woyld expire after some time, thus if the user didn't complete the process, our db would start filling up with stale transaction data.

    Hope that helps.

    --
    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+unsubscribe@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/50e1303a-0ad8-4ec9-9e41-85729c4b8b02%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • César García Tapia at Feb 2, 2014 at 8:21 pm
    Hi, Ahmed.

    Your suggestion makes sense, but I think that, being called
    *Session*WizardView, it's very likely that this information is already
    stored in the session data.

    The question is how could I "redraw" a concrete step, filled with the data
    previously entered by the user. I'm sure it's possible, but I can't figure
    out how.





    El domingo, 2 de febrero de 2014 15:30:28 UTC+1, Asad Jibran Ahmed escribió:
    We had a similar requirement in one of our products. We solved it by
    assigning the user a unique transaction id when they start the process, and
    saving all data in a temp db (redis) until the user completed the process.
    And whenever the user accessed a page with the transaction id in the get
    params, the data was autofilled in the form.

    Maybe you can do something similar by saving data for each part of the
    wizard in a temp db under one key and using that to pre-populate the forms?

    Also, we used keys that woyld expire after some time, thus if the user
    didn't complete the process, our db would start filling up with stale
    transaction data.

    Hope that helps.
    --
    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+unsubscribe@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/57fd5ab6-716e-4ba4-aa55-a5c94b1d63f5%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdjango-users @
categoriesdjango, python
postedFeb 1, '14 at 10:04p
activeFeb 2, '14 at 8:21p
posts3
users2
websitedjangoproject.com

People

Translate

site design / logo © 2021 Grokbase