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 >

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 >

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 =