1
0
mirror of https://github.com/django/django.git synced 2025-10-29 08:36:09 +00:00

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
This commit is contained in:
Malcolm Tredinnick
2007-04-01 05:26:26 +00:00
parent 4e31a17e9e
commit c60587b5a7
3 changed files with 19 additions and 1 deletions

View File

@@ -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):
"""