Example #1
0
 def clean_image(self):
     """Custom validator for image field"""
     return validate_image(self.cleaned_data.get('image', False), 310, 155)
Example #2
0
 def clean_wide_image(self):
     """Custom validator for wide_image field"""
     return validate_image(self.cleaned_data.get('wide_image', False), 680,
                           400)
Example #3
0
 def clean_wide_image_raw(self):
     """Custom validator for wide_image field"""
     return validate_image(self.cleaned_data.get('wide_image_raw', False),
                           WIDE_IMAGE_DIMENSIONS)
Example #4
0
 def clean_image_raw(self):
     """Custom validator for image field"""
     return validate_image(self.cleaned_data.get('image_raw', False),
                           NARROW_IMAGE_DIMENSIONS)
Example #5
0
 def clean_image_raw(self):
     """Custom validator for image field"""
     return validate_image(self.cleaned_data.get('image_raw', False), WIDE_IMAGE_DIMENSIONS)
Example #6
0
 def clean_narrow_image_raw(self):
     """Custom validator for narrow image field"""
     return validate_image(self.cleaned_data.get('narrow_image_raw', False),
                           ARTICLE_NARROW_IMAGE_DIMENSIONS)
Example #7
0
 def clean_narrow_image(self):
     """Custom validator for narrow image field"""
     return validate_image(self.cleaned_data.get('narrow_image', False),
                           310, 218)