summaryrefslogtreecommitdiff
path: root/django/forms/widgets.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/forms/widgets.py')
-rw-r--r--django/forms/widgets.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 2b7e07bea3..5e82c06213 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -508,6 +508,8 @@ class CheckboxInput(Input):
if self.check_test(value):
if attrs is None:
attrs = {}
+ else:
+ attrs = attrs.copy()
attrs['checked'] = True
return super(CheckboxInput, self).get_context(name, value, attrs)