Re: need help validating imagefield in modelform..

2009-02-14 Thread Briel
Hi, I haven't much forms with image/files, but I believe you should do something like this: photo = self.cleaned_data.get('photo') This is for your second version. When doing stuff like this I find it sometimes can be helpful to insert an error like just typing raise. Django will in the debug

need help validating imagefield in modelform..

2009-02-14 Thread PeteDK
Hi :) I'm trying to validate an uploaded image's size and filetype. However i have problems even gettings to the validation as django keeps telling me that there's no object. When i don't use the validation part I can upload an image just fine. So the upload thing works. I just can't figure out