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_warehouse/forms.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'archaeological_warehouse/forms.py') diff --git a/archaeological_warehouse/forms.py b/archaeological_warehouse/forms.py index 5ac907deb..fc8ba056e 100644 --- a/archaeological_warehouse/forms.py +++ b/archaeological_warehouse/forms.py @@ -33,6 +33,7 @@ from bootstrap_datepicker.widgets import DatePicker from ishtar_common.forms import name_validator, reverse_lazy, \ get_form_selection, TableSelect, ManageOldType, FinalForm, FormSet, \ CustomForm, FieldType +from ishtar_common.forms_common import get_image_help from archaeological_finds.forms import FindMultipleFormSelection, \ SelectFindBasketForm @@ -188,11 +189,7 @@ class ContainerForm(CustomForm, ManageOldType, forms.Form): associated_model=models.Warehouse, new=True), validators=[valid_id(models.Warehouse)]) 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()) comment = forms.CharField(label=_(u"Comment"), widget=forms.Textarea, required=False) -- cgit v1.2.3