blob: c47f8a33e0c71908d9cab274b8ed5b935dc94f2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From b7a50dce837006f8643e59a40a164a75010138e8 Mon Sep 17 00:00:00 2001
From: Michael van Tellingen <michael@mvantellingen.nl>
Date: Sun, 30 Apr 2017 10:15:08 +0200
Subject: [PATCH 7/8] 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
---
src/oscar/forms/widgets.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/oscar/forms/widgets.py b/src/oscar/forms/widgets.py
index 6f0f5e7..2a03919 100644
--- a/src/oscar/forms/widgets.py
+++ b/src/oscar/forms/widgets.py
@@ -48,8 +48,7 @@ class ImageInput(FileInput):
# can't display images that aren't stored
image_url = ''
else:
- image_url = final_attrs['value'] = force_text(
- self._format_value(value))
+ image_url = final_attrs['value'] = value
return render_to_string(self.template_name, {
'input_attrs': flatatt(final_attrs),
--
2.9.4
|