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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user