On Sun, Jul 17, 2011 at 01:19:59AM -0700, sq1020 wrote: > I just added am image field to a model form but when I try to upload > an image using the form, it gives me the following error saying that > the data could not be validated. I don't understand though, what is > it about the image that could not be validated? Is there any way to > decipher this from this error?
As the traceback suggests, the form didn't validate. That means you have to inspect its errors to see the specific reasons. By the way, usually you want to wrap the form.save call in try ... except to catch this exact exception and redisplay the form to the user in case it doesn't validate. Michal
signature.asc
Description: Digital signature