def clean_jjal(self): jjal = self.cleaned_data['jjal'] # ImageFieldFile instance if jjal: # jjal.file = thumbnail(jjal.file, 400, 400) jjal.file = square_image(jjal.file, 400) return jjal
def clean_attached_image(self): attached_image = self.cleaned_data['attached_image'] if attached_image: attached_image.file = square_image(attached_image.file, 400) return attached_image