Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.5.X] Fixed #19880 - Fixed an error in the form wizard initial_dict…

… example.

Thanks almalki for the report.

Backport of 9b97f01 from master
  • Loading branch information...
commit a97c441e18684570fbecd47b19bd47b4c06cc565 1 parent fceafa1
Tim Graham timgraham authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 docs/ref/contrib/formtools/form-wizard.txt
4 docs/ref/contrib/formtools/form-wizard.txt
View
@@ -537,7 +537,9 @@ Providing initial data for the forms
... '0': {'subject': 'Hello', 'sender': 'user@example.com'},
... '1': {'message': 'Hi there!'}
... }
- >>> wiz = ContactWizard.as_view([ContactForm1, ContactForm2], initial_dict=initial)
+ >>> # This example is illustrative only and isn't meant to be run in
+ >>> # the shell since it requires an HttpRequest to pass to the view.
+ >>> wiz = ContactWizard.as_view([ContactForm1, ContactForm2], initial_dict=initial)(request)
>>> form1 = wiz.get_form('0')
>>> form2 = wiz.get_form('1')
>>> form1.initial
Please sign in to comment.
Something went wrong with that request. Please try again.