Django

Code

Changeset 4894

Show
Ignore:
Timestamp:
04/01/07 00:26:26 (2 years ago)
Author:
mtredinnick
Message:

Fixed #3810 -- In newforms, copy attribute dictionaries before modifying them
in place.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/newforms/widgets.py

    r4523 r4894  
    2525 
    2626    def __init__(self, attrs=None): 
    27         self.attrs = attrs or {} 
     27        if attrs is not None: 
     28            self.attrs = attrs.copy() 
     29        else: 
     30            self.attrs = {} 
    2831 
    2932    def render(self, name, value, attrs=None): 
  • django/trunk/tests/regressiontests/forms/tests.py

    r4887 r4894  
    11# -*- coding: utf-8 -*- 
    22from localflavor import localflavor_tests 
     3from regressions import regression_tests 
    34 
    45form_tests = r""" 
     
    32983299    'form_tests': form_tests, 
    32993300    'localflavor': localflavor_tests, 
     3301    'regressions': regression_tests, 
    33003302} 
    33013303