diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-18 20:34:42 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-18 20:34:42 +0000 |
| commit | 283442a50e1acdbc101096980d0d2c656890710c (patch) | |
| tree | 00f14f64ba4205662d3eb20a63576f5a1716f247 /django/forms/forms.py | |
| parent | 01669a356ae8d10a4332c6f21590176b6bedfe0c (diff) | |
[1.0.X] Fixed #10002: inline file uploads now correctly display prior data. Thanks, dgouldin. Backport of r10588 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10589 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms/forms.py')
| -rw-r--r-- | django/forms/forms.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py index 04d4e6634c..b2f00bbb1d 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -366,7 +366,10 @@ class BoundField(StrAndUnicode): if callable(data): data = data() else: - data = self.data + if isinstance(self.field, FileField) and self.data is None: + data = self.form.initial.get(self.name, self.field.initial) + else: + data = self.data if not only_initial: name = self.html_name else: |
