Ticket #11044: formwizard_extra_context_fix.diff

File formwizard_extra_context_fix.diff, 905 bytes (added by Taylan Pince, 15 years ago)

Patch to move extra_context declaration under init

  • django/contrib/formtools/wizard.py

     
    1616from django.contrib.formtools.utils import security_hash
    1717
    1818class FormWizard(object):
    19     # Dictionary of extra template context variables.
    20     extra_context = {}
    21 
    2219    # The HTML (and POST data) field name for the "step" variable.
    2320    step_field_name="wizard_step"
    2421
     
    2623
    2724    def __init__(self, form_list, initial=None):
    2825        "form_list should be a list of Form classes (not instances)."
     26        # Dictionary of extra template context variables.
     27        self.extra_context = {}
    2928        self.form_list = form_list[:]
    3029        self.initial = initial or {}
    3130        self.step = 0 # A zero-based counter keeping track of which step we're in.
Back to Top