From: yleclanche Date: Thu, 19 Sep 2019 09:22:02 +0000 (+0200) Subject: Change accepted ratio X-Git-Tag: 1.4.1~5^2~12^2~11^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b2bb0e1cc95d5e0551e807dfbcf7f91c22a62840;p=teleforma.git Change accepted ratio --- diff --git a/teleforma/forms.py b/teleforma/forms.py index f7f06072..05eb516d 100644 --- a/teleforma/forms.py +++ b/teleforma/forms.py @@ -102,7 +102,7 @@ class UserForm(ModelForm): return image width, height = get_image_dimensions(image) ratio = float(height) / float(width) - if ratio > 1.5 or ratio < 1: + if ratio > 2.5 or ratio < 1: raise ValidationError({'portrait': "L'image n'est pas au format portrait."}) NEW_HEIGHT = 256 NEW_WIDTH = 200