summaryrefslogtreecommitdiff
path: root/django/newforms
diff options
context:
space:
mode:
authorBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-09 23:39:40 +0000
committerBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-09 23:39:40 +0000
commit8ceeb6d8cb5933ae518b2c75338decd2fc1bc97b (patch)
tree0db375d2fdfe324eddd17fa1e7f95df019732949 /django/newforms
parenta9b2c0686d98f78ca365a04057699a44f7711914 (diff)
boulder-oracle-sprint: Merged to [4989]
git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms')
-rw-r--r--django/newforms/widgets.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/newforms/widgets.py b/django/newforms/widgets.py
index 8d292673a5..f701faa35d 100644
--- a/django/newforms/widgets.py
+++ b/django/newforms/widgets.py
@@ -121,6 +121,12 @@ class FileInput(Input):
input_type = 'file'
class Textarea(Widget):
+ def __init__(self, attrs=None):
+ # The 'rows' and 'cols' attributes are required for HTML correctness.
+ self.attrs = {'cols': '40', 'rows': '10'}
+ if attrs:
+ self.attrs.update(attrs)
+
def render(self, name, value, attrs=None):
if value is None: value = ''
value = smart_unicode(value)