diff options
| author | Brian Rosner <brosner@gmail.com> | 2008-04-29 04:31:59 +0000 |
|---|---|---|
| committer | Brian Rosner <brosner@gmail.com> | 2008-04-29 04:31:59 +0000 |
| commit | 95dcdf473ed08f03040334d716c4e60c2a41e57c (patch) | |
| tree | 72e4ee8f5513bd0735d07d60c4ed65314bb2b60a /django/newforms | |
| parent | c9c714f0f89170ab43b9bb6e5c0ea1f3183301de (diff) | |
newforms-admin: Fixed #6964 -- Implemented FileInput._has_changed. Before it was comparing the wrong values and causing it to trip up.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7506 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms')
| -rw-r--r-- | django/newforms/widgets.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/newforms/widgets.py b/django/newforms/widgets.py index df5c20d97d..16e617301b 100644 --- a/django/newforms/widgets.py +++ b/django/newforms/widgets.py @@ -262,6 +262,11 @@ class FileInput(Input): def value_from_datadict(self, data, files, name): "File widgets take data from FILES, not POST" return files.get(name, None) + + def _has_changed(self, initial, data): + if data is None: + return False + return True class Textarea(Widget): def __init__(self, attrs=None): |
