Browse Source

Fix widgets.ImageInput for Django 1.11

The FileInput.format_value returns None instead of the passed value
in Django 1.11. Remove the usage of format_value since it was a noop
before Django 1.11 anyway

Fixes #2334
master
Michael van Tellingen 8 years ago
parent
commit
0332965249
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/oscar/forms/widgets.py

+ 1
- 2
src/oscar/forms/widgets.py View File

@@ -48,8 +48,7 @@ class ImageInput(FileInput):
48 48
             # can't display images that aren't stored
49 49
             image_url = ''
50 50
         else:
51
-            image_url = final_attrs['value'] = force_text(
52
-                self._format_value(value))
51
+            image_url = final_attrs['value'] = value
53 52
 
54 53
         return render_to_string(self.template_name, {
55 54
             'input_attrs': flatatt(final_attrs),

Loading…
Cancel
Save