Ticket #4271: 4271.diff

File 4271.diff, 564 bytes (added by Gary Wilson <gary.wilson@…>, 17 years ago)

use copy of passed data.

  • django/newforms/forms.py

    === modified file 'django/newforms/forms.py'
     
    5757    # class, not to the Form class.
    5858    def __init__(self, data=None, auto_id='id_%s', prefix=None, initial=None):
    5959        self.is_bound = data is not None
    60         self.data = data or {}
     60        if data:
     61            self.data = data.copy()
     62        else:
     63            self.data = {}
    6164        self.auto_id = auto_id
    6265        self.prefix = prefix
    6366        self.initial = initial or {}
Back to Top