Ticket #2899: formwrapper_defaults.2.diff

File formwrapper_defaults.2.diff, 831 bytes (added by john@…, 18 years ago)

New version of [patch] with changes suggested by adurdin

  • django/forms/__init__.py

     
    108108    This allows dictionary-style lookups of formfields. It also handles feeding
    109109    prepopulated data and validation error messages to the formfield objects.
    110110    """
    111     def __init__(self, manipulator, data, error_dict, edit_inline=True):
    112         self.manipulator, self.data = manipulator, data
    113         self.error_dict = error_dict
     111    def __init__(self, manipulator, data=None, error_dict=None, edit_inline=True):
     112        self.manipulator = manipulator
     113        self.data = data or {}
     114        self.error_dict = error_dict or {}
    114115        self._inline_collections = None
    115116        self.edit_inline = edit_inline
    116117
Back to Top