--
Ticket URL: <https://code.djangoproject.com/ticket/22800>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I'm not entirely following what you mean. If I understand correctly, the
issue you have is that if a user returns to the '''same''' FormWizard at a
later time, their data is still in the form? Could you provide an example
of the issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/22800#comment:1>
Comment (by danielsamuels):
The same FormWizard, but in a different context. Say for example you have
a form where you enter your address information for a specific item, so
your URL is /item/4/form/, you then go to /item/5/form/ which technically
is the same FormWizard - but for a different item - the information you
entered in the first form, if you didn't complete it, will be displayed on
the 2nd form even though you've never been to that page before. So it's
the same FormWizard used in different contexts, but the data from one
appears in the other.
--
Ticket URL: <https://code.djangoproject.com/ticket/22800#comment:2>
* cc: apollo13 (added)
* stage: Unreviewed => Accepted
Comment:
Jupp, this is the result of
https://github.com/django/django/blob/master/django/contrib/formtools/wizard/views.py#L195-L197
-- a quick workaround would be to create a subclass in the view which
includes the ID :( If you'd like to work on a real fix I think we should
add a random hash to it and send it along via the management form.
--
Ticket URL: <https://code.djangoproject.com/ticket/22800#comment:3>
Comment (by danielsamuels):
What about being able to provide an instance specific key? I know in my
situation I could have provided the event ID as the 'salt', I'm sure it
would be fairly trivial for most people to provide a value which is
instance specific.
--
Ticket URL: <https://code.djangoproject.com/ticket/22800#comment:4>
Comment (by apollo13):
Right, that should suffice for most usecases!
--
Ticket URL: <https://code.djangoproject.com/ticket/22800#comment:5>
* cc: mail@… (added)
Comment:
Is there really a change to Django necessary? Daniel could just override
get_prefix in his view and return a prefix based on his event ID. I just
thought about how I'd design an API to provide an "instance specific key",
als you put it, and what I came up with was exactly what get_prefix
already is.
If you think there should be another way to do this, I'd like to work on
this as my first contribution to Django itself, as I will have the same
use case in one of my current projects.
--
Ticket URL: <https://code.djangoproject.com/ticket/22800#comment:6>
* status: new => closed
* resolution: => fixed
Comment:
formtools has been extracted into its own repository
(https://github.com/django/django-formtools/). Because of this, the issue
tracking for this package has been moved to GitHub issues. I'm going to
close this ticket, but I've created a GitHub issue to replace it where the
conversation can continue: https://github.com/django/django-
formtools/issues/15. Thanks!
--
Ticket URL: <https://code.djangoproject.com/ticket/22800#comment:7>