From 05eeada23bd7065bf750e88c4c3125676e9ace92 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 27 Feb 2018 15:47:32 +0100 Subject: Allow no resizing of images (by explicit parameter in settings) --- archaeological_finds/forms.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'archaeological_finds/forms.py') diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 26ba8350f..191c8722a 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -43,7 +43,8 @@ from ishtar_common.forms import FormSet, FloatField, \ get_form_selection, reverse_lazy, TableSelect, get_now, FinalForm, \ ManageOldType, FieldType, IshtarForm -from ishtar_common.forms_common import get_town_field, SourceSelect, CustomForm +from ishtar_common.forms_common import get_town_field, \ + get_image_help, SourceSelect, CustomForm from ishtar_common.utils import convert_coordinates_to_point from ishtar_common import widgets from bootstrap_datepicker.widgets import DatePicker @@ -204,11 +205,7 @@ class FindForm(CustomForm, ManageOldType): label=_(u"Comment on dating"), required=False, widget=forms.Textarea) estimated_value = FloatField(label=_(u"Estimated value"), required=False) image = forms.ImageField( - label=_(u"Image"), help_text=mark_safe( - _(u"

Heavy images are resized to: %(width)dx%(height)d " - u"(ratio is preserved).

") % { - 'width': settings.IMAGE_MAX_SIZE[0], - 'height': settings.IMAGE_MAX_SIZE[1]}), + label=_(u"Image"), help_text=mark_safe(get_image_help()), max_length=255, required=False, widget=widgets.ImageFileInput()) TYPES = [ -- cgit v1.2.3