diff options
| author | Tim Graham <timograham@gmail.com> | 2013-02-23 15:26:41 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-02-23 15:28:03 -0500 |
| commit | a97c441e18684570fbecd47b19bd47b4c06cc565 (patch) | |
| tree | 749b57ef29c792e2b71be8a0033f8a1e1c492b50 | |
| parent | fceafa192901856edc0d44b593420e36100136b8 (diff) | |
[1.5.X] Fixed #19880 - Fixed an error in the form wizard initial_dict example.
Thanks almalki for the report.
Backport of 9b97f01dea from master
| -rw-r--r-- | docs/ref/contrib/formtools/form-wizard.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt index ee9114acf9..bcffb7716b 100644 --- a/docs/ref/contrib/formtools/form-wizard.txt +++ b/docs/ref/contrib/formtools/form-wizard.txt @@ -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 |
