Opened 13 years ago

Closed 13 years ago

#16453 closed Bug (fixed)

FormWizard: Incorrect method signature

Reported by: anonymous Owned by: nobody
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The documentation at https://docs.djangoproject.com/en/1.3/ref/contrib/formtools/form-wizard/#creating-a-formwizard-class states that the method signature for done() is as follows:
def done(self, request, form_list):

Using this example results in the following error:
done() takes exactly 3 arguments (2 given)

The correct signature is as follows (without the request argument):
def done(self, form_list):

Change History (1)

comment:1 by Bernhard Essl, 13 years ago

Easy pickings: unset
Resolution: fixed
Status: newclosed

If you using django trunk you should look at the development docs (replace "1.3" with "dev") https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/#creating-a-wizardview-class.

However, the example in the dev docs should work:

def done(self, form_list, **kwargs):
Note: See TracTickets for help on using tickets.
Back to Top