From: yleclanche Date: Thu, 19 Sep 2019 09:22:02 +0000 (+0200) Subject: Change accepted ratio X-Git-Tag: 1.4.1~13 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=e0f396b7c95c518fe6c259fd1e0f5b11df9d476b;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