summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-01 05:26:26 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-04-01 05:26:26 +0000
commitc60587b5a7692807c2d0f1970d45e2bde724233d (patch)
treedb3f599bc90149bc301c30ee6681db35769f1121 /django
parent4e31a17e9e4781d84149940e2084a7e1060919f0 (diff)
Fixed #3810 -- In newforms, copy attribute dictionaries before modifying them
in place. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/newforms/widgets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/newforms/widgets.py b/django/newforms/widgets.py
index 18bba31897..58d8ab1322 100644
--- a/django/newforms/widgets.py
+++ b/django/newforms/widgets.py
@@ -24,7 +24,10 @@ class Widget(object):
is_hidden = False # Determines whether this corresponds to an <input type="hidden">.
def __init__(self, attrs=None):
- self.attrs = attrs or {}
+ if attrs is not None:
+ self.attrs = attrs.copy()
+ else:
+ self.attrs = {}
def render(self, name, value, attrs=None):
"""