summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorHonza Král <honza.kral@gmail.com>2009-09-11 21:23:55 +0000
committerHonza Král <honza.kral@gmail.com>2009-09-11 21:23:55 +0000
commit9222091de8fa2fcb4fedd74ac99b65c88d295135 (patch)
tree32069d6f3f1fce7bc06d257113999f41a0ce31c1 /django/forms
parent78d75b86e3e45ec3ca9f2ace21255922046dd509 (diff)
[soc2009/model-validation] Merged to trunk at r11499
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/widgets.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index cecafa880b..b1d2cb7cda 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -275,9 +275,10 @@ class FileInput(Input):
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 = ''