Re: Manually setting an ImageField gives a SQL error

2006-10-12 Thread Corey Oordt
Thanks for the tip, I am using os.path.splitext() ! I think somehow the problem lies with psycopg and it's "auto-quoting" feature. I'm not sure how it figures out what needs to be quoted and what doesn't. Thanks for the help, RajeshD! Corey On Oct 12, 2006, at 4:07 PM, RajeshD wrote: > >

Re: Manually setting an ImageField gives a SQL error

2006-10-12 Thread RajeshD
> > UPDATE "addocs_document" SET > "doctype"=2,"ad_id"='123456',"height"=0,"width"=0,"image"=ad_document > s/2006/10/12/123456_2_8..pdf,"submitted"='2006-10-12 > 12:43:24',"received"='2006-10-12 12:57:12.155 598' WHERE "id"=8 > > As you can see in the UPDATE statement, it is relative to the > MEDI

Re: Manually setting an ImageField gives a SQL error

2006-10-12 Thread RajeshD
> > UPDATE "addocs_document" SET > "doctype"=2,"ad_id"='123456',"height"=0,"width"=0,"image"=ad_document > s/2006/10/12/123456_2_8..pdf,"submitted"='2006-10-12 > 12:43:24',"received"='2006-10-12 12:57:12.155 598' WHERE "id"=8 > > As you can see in the UPDATE statement, it is relative to the > MEDI

Re: Manually setting an ImageField gives a SQL error

2006-10-12 Thread Corey Oordt
Here is the stack trace: --- psycopg.ProgrammingError Traceback (most recent call last) /home/django_dev/pennysaver/ /home/django_dev/pennysaver/addocs/processworkflows.py in start_check_workf

Re: Manually setting an ImageField gives a SQL error

2006-10-12 Thread RajeshD
> The sve() method gives an error tracing back to the UPDATE statement. Usually it helps get you better responses, if you include the actual stack trace. > In the statement the 'image' field looks like > "image"=/path/to/the/file.ext, ... > > What is the proper method to set this field? The Ima

Manually setting an ImageField gives a SQL error

2006-10-12 Thread Corey
I'm writing an app that gathers images from other file sources and puts them into a database. To do this I have a model with an ImageField. When I set the field to the filename, it doesn't quote it in the resulting SQL passed to the backed. Here is what I'm doing, exactly: doc.image = os.pa