Opened 4 years ago

Closed 4 years ago

#16453 closed Bug (fixed)

FormWizard: Incorrect method signature

Reported by: anonymous Owned by: nobody
Component: Forms Version: master
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 Changed 4 years ago by BernhardEssl

  • Easy pickings unset
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

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