#14576 closed (fixed)
Regression in FormWizard
Reported by: | Timothée Peignier | Owned by: | nobody |
---|---|---|---|
Component: | contrib.formtools | Version: | 1.2 |
Severity: | Keywords: | form wizard sprintnov13 | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It seems that changeset [14291] introduced a regression in FormWizard.
The last form of the wizard is never passed to done(self, request, form_list)
, that make FormWizard much useless.
Here is the regression test that should help :
def test_14291(self): reached = [False] that = self class WizardWithProcessStep(WizardClass): def done(self, request, form_list): reached[0] = True that.assertTrue(len(form_list) == 2) wizard = WizardWithProcessStep([WizardPageOneForm, WizardPageTwoForm]) data = {"0-field": "test", "1-field": "test2", "hash_0": "2fdbefd4c0cad51509478fbacddf8b13", "wizard_step": "1"} wizard(DummyRequest(POST=data)) self.assertTrue(reached[0])
Attachments (2)
Change History (10)
by , 14 years ago
Attachment: | 14576-regression-test.py added |
---|
comment:1 by , 14 years ago
milestone: | → 1.3 |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 14 years ago
Keywords: | sprintnov13 added |
---|
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 14 years ago
comment:6 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This bug is not fixed properly.
Instead of appending a fresh instance of the last form (using get_form()) it should just append the "form" variable as that is the already created instance of the last form and it has been validated.
The solution currently applied for 1.3 breaks accessing cleaned_data.
comment:7 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
On deeper inspection this is actually fixed properly in trunk, the patch attached to this bug is just wrong.
Regression test as a patch