diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-07-14 05:04:57 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-07-14 05:04:57 +0000 |
| commit | 2624f4ea563e8139c7f19a20d9b723d39b1e6ac1 (patch) | |
| tree | 975193cb2d38ec3369e2688818d41e07660fb40a /django/newforms/fields.py | |
| parent | f3cda0b77afb2a6e22520b4c9f1c6d111add6ac9 (diff) | |
newforms-admin: Merged from trunk up to [7917].
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7922 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms/fields.py')
| -rw-r--r-- | django/newforms/fields.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/newforms/fields.py b/django/newforms/fields.py index ad46d78859..bfff9fe8b0 100644 --- a/django/newforms/fields.py +++ b/django/newforms/fields.py @@ -507,6 +507,8 @@ class ImageField(FileField): trial_image.verify() except Exception: # Python Imaging Library doesn't recognize it as an image raise ValidationError(self.error_messages['invalid_image']) + if hasattr(f, 'seek') and callable(f.seek): + f.seek(0) return f url_re = re.compile( |
