summaryrefslogtreecommitdiff
path: root/django/newforms/forms.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-13 06:23:30 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-13 06:23:30 +0000
commit28f66bb097799f34a6ead02fe4ecafa493cee06b (patch)
tree1a80e2849772c92b3fc840487848a5222ea4d1d0 /django/newforms/forms.py
parentbc044651aaed9eedbc195414a71bde4e375a7c73 (diff)
unicode: Merged from trunk up to [5213].
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms/forms.py')
-rw-r--r--django/newforms/forms.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/newforms/forms.py b/django/newforms/forms.py
index 9fafd20787..edd1992cf4 100644
--- a/django/newforms/forms.py
+++ b/django/newforms/forms.py
@@ -255,6 +255,8 @@ class BoundField(StrAndUnicode):
attrs['id'] = auto_id
if not self.form.is_bound:
data = self.form.initial.get(self.name, self.field.initial)
+ if callable(data):
+ data = data()
else:
data = self.data
return widget.render(self.html_name, data, attrs=attrs)