Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Luke Plant authored September 10, 2009

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  django/forms/widgets.py
6  django/forms/widgets.py
@@ -139,6 +139,7 @@ def __init__(self, attrs=None):
139 139
             self.attrs = attrs.copy()
140 140
         else:
141 141
             self.attrs = {}
  142
+        super(Widget, self).__init__(attrs)
142 143
 
143 144
     def __deepcopy__(self, memo):
144 145
         obj = copy.copy(self)
@@ -275,9 +276,10 @@ def _has_changed(self, initial, data):
275 276
 class Textarea(Widget):
276 277
     def __init__(self, attrs=None):
277 278
         # The 'rows' and 'cols' attributes are required for HTML correctness.
278  
-        self.attrs = {'cols': '40', 'rows': '10'}
  279
+        default_attrs = {'cols': '40', 'rows': '10'}
279 280
         if attrs:
280  
-            self.attrs.update(attrs)
  281
+            default_attrs.update(attrs)
  282
+        super(Textarea, self).__init__(default_attrs)
281 283
 
282 284
     def render(self, name, value, attrs=None):
283 285
         if value is None: value = ''

0 notes on commit d18dace

Please sign in to comment.
Something went wrong with that request. Please try again.