Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #11703: Added missing Super calls to 2 widget classes.

 
Thanks Rupe



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11491 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit d18dace8ebe81e856e4a1e05c9d149a6c14aea5f 1 parent 49b9470
@spookylukey spookylukey authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 django/forms/widgets.py
View
6 django/forms/widgets.py
@@ -139,6 +139,7 @@ def __init__(self, attrs=None):
self.attrs = attrs.copy()
else:
self.attrs = {}
+ super(Widget, self).__init__(attrs)
def __deepcopy__(self, memo):
obj = copy.copy(self)
@@ -275,9 +276,10 @@ def _has_changed(self, initial, data):
class Textarea(Widget):
def __init__(self, attrs=None):
# The 'rows' and 'cols' attributes are required for HTML correctness.
- self.attrs = {'cols': '40', 'rows': '10'}
+ default_attrs = {'cols': '40', 'rows': '10'}
if attrs:
- self.attrs.update(attrs)
+ default_attrs.update(attrs)
+ super(Textarea, self).__init__(default_attrs)
def render(self, name, value, attrs=None):
if value is None: value = ''
Please sign in to comment.
Something went wrong with that request. Please try again.