Skip to content

Commit

Permalink
[1.2.X] Fixed #13951 -- Corrected docstring in formtools wizard. Than…
Browse files Browse the repository at this point in the history
…ks to suzaku for the report, and lrekucki for the patch.

Backport of r13630 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Aug 23, 2010
1 parent e47520b commit 2bbcb1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django/contrib/formtools/wizard.py
Expand Up @@ -27,7 +27,7 @@ class FormWizard(object):
def __init__(self, form_list, initial=None):
"""
Start a new wizard with a list of forms.
form_list should be a list of Form classes (not instances).
"""
self.form_list = form_list[:]
Expand All @@ -37,7 +37,7 @@ def __init__(self, form_list, initial=None):
self.extra_context = {}

# A zero-based counter keeping track of which step we're in.
self.step = 0
self.step = 0

def __repr__(self):
return "step: %d\nform_list: %s\ninitial_data: %s" % (self.step, self.form_list, self.initial)
Expand All @@ -48,7 +48,7 @@ def get_form(self, step, data=None):

def num_steps(self):
"Helper method that returns the number of steps."
# You might think we should just set "self.form_list = len(form_list)"
# You might think we should just set "self.num_steps = len(form_list)"
# in __init__(), but this calculation needs to be dynamic, because some
# hook methods might alter self.form_list.
return len(self.form_list)
Expand Down

0 comments on commit 2bbcb1a

Please sign in to comment.