Re: custom validation (clean_) based on image height and width

2009-03-19 Thread Michael A. Repucci
Perfect. Thank you! On Thu, Mar 19, 2009 at 3:36 PM, Alex Gaynor wrote: > > > On Thu, Mar 19, 2009 at 3:31 PM, Michael Repucci wrote: > >> >> I'm struggling with what seems like should be a very straightforward >> task. I have a model with a field named image of type ImageField, and >> I'd like

Re: custom validation (clean_) based on image height and width

2009-03-19 Thread Alex Gaynor
On Thu, Mar 19, 2009 at 3:31 PM, Michael Repucci wrote: > > I'm struggling with what seems like should be a very straightforward > task. I have a model with a field named image of type ImageField, and > I'd like to do custom validation via the model form's clean_image > method based on the height

custom validation (clean_) based on image height and width

2009-03-19 Thread Michael Repucci
I'm struggling with what seems like should be a very straightforward task. I have a model with a field named image of type ImageField, and I'd like to do custom validation via the model form's clean_image method based on the height and width (in pixels) of the image. If I just grab the image obje