fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor upgrades.
[redakcja.git]
/
src
/
cover
/
forms.py
diff --git
a/src/cover/forms.py
b/src/cover/forms.py
index
e6f7868
..
e5bc400
100755
(executable)
--- a/
src/cover/forms.py
+++ b/
src/cover/forms.py
@@
-3,7
+3,7
@@
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-from
StringIO import String
IO
+from
io import Bytes
IO
from django import forms
from django.conf import settings
from django import forms
from django.conf import settings
@@
-55,7
+55,7
@@
class ImageAddForm(forms.ModelForm):
raise forms.ValidationError(ugettext('No image specified'))
if download_url:
image_data = URLOpener().open(download_url).read()
raise forms.ValidationError(ugettext('No image specified'))
if download_url:
image_data = URLOpener().open(download_url).read()
- width, height = PILImage.open(
String
IO(image_data)).size
+ width, height = PILImage.open(
Bytes
IO(image_data)).size
else:
width, height = PILImage.open(uploaded_file.file).size
min_width, min_height = settings.MIN_COVER_SIZE
else:
width, height = PILImage.open(uploaded_file.file).size
min_width, min_height = settings.MIN_COVER_SIZE