Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
@Steve, very well. I concede. It's just that it was not the first time I thought he could be more respectful in his approach. He has acknowledged and apologised for this type of behaviour previously. My concern is that those types of unhelpful responses could lead to newcomers feeling that this

Re: PIL issue opening an image file

2010-11-26 Thread Steve Holden
On 11/26/2010 9:58 AM, Sithembewena Lloyd Dube wrote: > Thanks for breaking this down, Tom. I'll play around with it and see if > I'm grasping this. For the record, while it might have seemed to you that Bruno was being "snooty", in fact he was probably (I have no direct evidence) simply

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Kate, that was... On Fri, Nov 26, 2010 at 9:07 PM, Sithembewena Lloyd Dube wrote: > So, I am making headway. Thanks to the gentlemen who nudged me onto the > right path. > > Quick word to Bruno Desthuilliers: while I appreciate that you have greater > experience and might find

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
So, I am making headway. Thanks to the gentlemen who nudged me onto the right path. Quick word to Bruno Desthuilliers: while I appreciate that you have greater experience and might find others' endeavours ridiculous, you could be more helpful and respectful in your tone. Do you see a difference

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Thanks for breaking this down, Tom. I'll play around with it and see if I'm grasping this. Regards, Lloyd On Fri, Nov 26, 2010 at 5:55 PM, Tom Evans wrote: > On Fri, Nov 26, 2010 at 3:44 PM, Sithembewena Lloyd Dube > wrote: > > Thanks Daniel, makes

Re: PIL issue opening an image file

2010-11-26 Thread Tom Evans
On Fri, Nov 26, 2010 at 3:44 PM, Sithembewena Lloyd Dube wrote: > Thanks Daniel, makes sense. I gather that what Bruno meant to say on his > soapbox was that the file is in the HTTP request object and can/ should not > be accessible from the hard disk? > > I was familiar with

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Thanks Daniel, makes sense. I gather that what Bruno meant to say on his soapbox was that the file is in the HTTP request object and can/ should not be accessible from the hard disk? I was familiar with that, as the file upload dialogue does the job of reading the file off the disk and into

Re: PIL issue opening an image file

2010-11-26 Thread Daniel Roseman
On Nov 26, 3:16 pm, Sithembewena Lloyd Dube wrote: > Bruno, the file being uploaded has nothing to do with the deployment server. > When you edit your Google profile to change your avatar, does the file > upload dialogue browse a Google server? No. But that has nothing

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Bruno, the file being uploaded has nothing to do with the deployment server. When you edit your Google profile to change your avatar, does the file upload dialogue browse a Google server? On Fri, Nov 26, 2010 at 4:50 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > > > On 26

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Thanks for nothing. On Fri, Nov 26, 2010 at 4:52 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On 26 nov, 15:33, Sithembewena Lloyd Dube wrote: > > Thanks Daniel, > > > > Using photo.path causes it to try to find the image in my MEDIA_ROOT, > which > > is

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Well, Bruno, if I knew exactly how to solve this I wouldn't be sitting here taking your snooty remarks, would I? I am asking because I do not know how to go about it. On Fri, Nov 26, 2010 at 4:50 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > > > On 26 nov, 15:03, Sithembewena

Re: PIL issue opening an image file

2010-11-26 Thread bruno desthuilliers
On 26 nov, 15:33, Sithembewena Lloyd Dube wrote: > Thanks Daniel, > > Using photo.path causes it to try to find the image in my MEDIA_ROOT, which > is not what I need. Yes it is. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: PIL issue opening an image file

2010-11-26 Thread bruno desthuilliers
On 26 nov, 15:03, Sithembewena Lloyd Dube wrote: > I found the issue: it is the path to the image. When I change the problem > line to > > image = Image.open(os.path.realpath('C:\Users\Lloyd\Desktop\Lloyd.png')) > > it works, Well, kinda... accidentally... > but I cannot

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
If I was handling the photo in a view, I'm sure I could get the path information out of request.FILES['filename'] - but I am trying to upload it in a model. Regards, Lloyd On Fri, Nov 26, 2010 at 4:33 PM, Sithembewena Lloyd Dube wrote: > Thanks Daniel, > > Using photo.path

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Thanks Daniel, Using photo.path causes it to try to find the image in my MEDIA_ROOT, which is not what I need. I need a way to get the path from the image upload dialogue as encircled in the attached image. The image is currently on my desktop and not in my media root and I need to get the

Re: PIL issue opening an image file

2010-11-26 Thread Daniel Roseman
On Nov 26, 2:03 pm, Sithembewena Lloyd Dube wrote: > I found the issue: it is the path to the image. When I change the problem > line to > > image = Image.open(os.path.realpath('C:\Users\Lloyd\Desktop\Lloyd.png')) > > it works, but I cannot hard code the path and I cannot

Re: PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
I found the issue: it is the path to the image. When I change the problem line to image = Image.open(os.path.realpath('C:\Users\Lloyd\Desktop\Lloyd.png')) it works, but I cannot hard code the path and I cannot predict where the user will try to upload a file from. Isn't there a way to

PIL issue opening an image file

2010-11-26 Thread Sithembewena Lloyd Dube
Hi all, I have a Photo model which should take an image, generate a thumbnail and save both the original and the thumbnail images. I registered the model in the admin site, but when I select an image to upload and click 'Save', I get an error as follows: Request Method: POST Request URL: