the view i think. on a form submission. new forms have save method too. konstantin
On Mar 12, 8:46 pm, "gorans" <[EMAIL PROTECTED]> wrote: > Hmm.. I see the point there. > > But where would be the right place to generate the set of thumbs from > the original image? > > On Mar 13, 1:04 am, "akonsu" <[EMAIL PROTECTED]> wrote: > > > > > hello, > > > regarding the last part of your post: i have an unconfirmed suspicion > > that data validation should not be done in models but in the forms > > that manipulate data. does anyone know if this is correct? > > > konstantin > > > On Mar 12, 9:56 am, "gorans" <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I'm trying to access the value of an image field which is uploaded in > > > the django admin interface - prior to calling the save. > > > > I have a model called Photo with three attributes: large, medium and > > > small. Each are ImageFields. > > > > I have overwritten the save( ) function in Photo so that I can check > > > that the uploaded file is 800 x 600 px (and then proceed to generate > > > medium and small) with PIL. However, when I call self.large I end up > > > with an empty string. > > > > How would I access the filename of the uploaded image before the super > > > (save) has been called? (* I think this problem is happening because I > > > am using the admin *) > > > > Is overwriting the save method the best way to go about this? I am > > > aware that I could create a custom Field but I would like to avoid > > > that. > > > > Any direction will be greatly appreciated > > > > Goran- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

