From d7e1978d8f5358652080f789303f59c3ddf07047 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_context_records/forms.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index e776f2ec7..61460ab3b 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -40,7 +40,8 @@ from archaeological_operations.widgets import OAWidget from ishtar_common.forms import FinalForm, FormSet, \ reverse_lazy, get_form_selection, TableSelect, ManageOldType, CustomForm,\ FieldType, IshtarForm -from ishtar_common.forms_common import get_town_field, SourceSelect +from ishtar_common.forms_common import get_town_field, SourceSelect, \ + get_image_help from archaeological_operations.forms import OperationSelect, ParcelField,\ RecordRelationsForm as OpeRecordRelationsForm, RecordRelationsFormSetBase @@ -181,11 +182,7 @@ class RecordFormGeneral(CustomForm, ManageOldType): label=_(u"Location"), widget=forms.Textarea, required=False, validators=[validators.MaxLengthValidator(200)]) 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