Re: Getting SQL from QuerySet

2008-12-31 Thread Matías Costa
On Tue, Dec 30, 2008 at 9:11 PM, Info Cascade wrote: > > Hi -- > > I am getting intermittent errors on certain database queries on our > production server. > I am having a hard time duplicating them (most of the time they run > okay, only sometimes on the production server am I receiving exceptio

Re: Getting SQL from QuerySet

2008-12-30 Thread Russell Keith-Magee
On Wed, Dec 31, 2008 at 5:11 AM, Info Cascade wrote: > > Hi -- > > I am getting intermittent errors on certain database queries on our > production server. > I am having a hard time duplicating them (most of the time they run > okay, only sometimes on the production server am I receiving exceptio

Re: Getting SQL from QuerySet

2008-12-30 Thread flo...@gmail.com
I think that >>> print my_query_set.query.as_sql() should do the trick. Thanks, Eric Florenzano On Dec 30, 12:11 pm, Info Cascade wrote: > Hi -- > > I am getting intermittent errors on certain database queries on our > production server. > I am having a hard time duplicating them (most of the

Getting SQL from QuerySet

2008-12-30 Thread Info Cascade
Hi -- I am getting intermittent errors on certain database queries on our production server. I am having a hard time duplicating them (most of the time they run okay, only sometimes on the production server am I receiving exception messages), so I want to log the SQL query itself and see what it