Re: Error in image upload while copying file

2010-03-31 Thread pjmorse
On Mar 30, 10:53 am, bruno desthuilliers wrote: > Uh. Oh, well - then you indeed have a problem :( > Hum... Is that legacy code ? Looks pretty ugly to me - wouldn't pass a > code review here. > Well, assuming you're using at least Django 1.0, I suggest you get rid > of this mess and make appropri

Re: Error in image upload while copying file

2010-03-30 Thread bruno desthuilliers
On 29 mar, 18:59, pjmorse wrote: > On Mar 29, 8:22 am, bruno desthuilliers > > wrote: > > On 19 mar, 20:05,pjmorse wrote: > > > > In my application's admin console, there's a tiny form for updating > > > the image associated with a specific model. > > > > When a file is uploaded, the application

Re: Error in image upload while copying file

2010-03-29 Thread pjmorse
On Mar 29, 8:22 am, bruno desthuilliers wrote: > On 19 mar, 20:05,pjmorse wrote: > > > In my application's admin console, there's a tiny form for updating > > the image associated with a specific model. > > > When a file is uploaded, the application reaches this code: > > >         if request.meth

Re: Error in image upload while copying file

2010-03-29 Thread bruno desthuilliers
On 19 mar, 20:05, pjmorse wrote: > In my application's admin console, there's a tiny form for updating > the image associated with a specific model. > > When a file is uploaded, the application reaches this code: > >         if request.method == 'POST': >                 file = request.FILES.copy(

Re: Error in image upload while copying file

2010-03-29 Thread pjmorse
Continued research (I kept asking people) suggests that this is a consequence of moving from Python2.4 to Python2.5. The options appear to be: * Downgrade Python to 2.4 * Find a "more compatible" copy method. I'd really rather not downgrade Python, but I don't know how to find a "more compatible"

Error in image upload while copying file

2010-03-19 Thread pjmorse
In my application's admin console, there's a tiny form for updating the image associated with a specific model. When a file is uploaded, the application reaches this code: if request.method == 'POST': file = request.FILES.copy() ...and fails with this error: object.__new