Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1104: set `FormWizard.extra_context` in `__init__` to avoid co…

…ntext leakage.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4c18facdf7d0f609cd7f3c72c142d7be7b14a6c9 1 parent 698410a
Jacob Kaplan-Moss authored March 01, 2010

Showing 1 changed file with 11 additions and 5 deletions. Show diff stats Hide diff stats

  1. 16  django/contrib/formtools/wizard.py
16  django/contrib/formtools/wizard.py
@@ -19,19 +19,25 @@
19 19
 
20 20
 
21 21
 class FormWizard(object):
22  
-    # Dictionary of extra template context variables.
23  
-    extra_context = {}
24  
-
25 22
     # The HTML (and POST data) field name for the "step" variable.
26 23
     step_field_name="wizard_step"
27 24
 
28 25
     # METHODS SUBCLASSES SHOULDN'T OVERRIDE ###################################
29 26
 
30 27
     def __init__(self, form_list, initial=None):
31  
-        "form_list should be a list of Form classes (not instances)."
  28
+        """
  29
+        Start a new wizard with a list of forms.
  30
+        
  31
+        form_list should be a list of Form classes (not instances).
  32
+        """
32 33
         self.form_list = form_list[:]
33 34
         self.initial = initial or {}
34  
-        self.step = 0 # A zero-based counter keeping track of which step we're in.
  35
+
  36
+        # Dictionary of extra template context variables.
  37
+        extra_context = {}
  38
+
  39
+        # A zero-based counter keeping track of which step we're in.
  40
+        self.step = 0 
35 41
 
36 42
     def __repr__(self):
37 43
         return "step: %d\nform_list: %s\ninitial_data: %s" % (self.step, self.form_list, self.initial)

0 notes on commit 4c18fac

Please sign in to comment.
Something went wrong with that request. Please try again.