diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-18 20:29:55 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-04-18 20:29:55 +0000 |
| commit | 1e4ad6f118007547c7e627f1d5bd11bfb2992bf9 (patch) | |
| tree | 290125870f412765e36bf49cb69fb80ea8700d04 /django/forms | |
| parent | a075422bfc433d196b2fd1e64b8c8b9dbbf32591 (diff) | |
Fixed #10002: inline file uploads now correctly display prior data. Thanks, dgouldin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10588 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
| -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 ef9d657657..1b9faa7e4d 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -380,7 +380,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: |
