Re: Best Practice for Raw SQL

2011-04-14 Thread Dan Gentry
Thanks. I'll give raw() a try. On Apr 11, 11:51 am, Jacob Kaplan-Moss wrote: > On Mon, Apr 11, 2011 at 7:53 AM, Dan Gentry wrote: > > Where I run into trouble is that the query returns data in columns, > > but not objects. That means that I can’t

RE: Best Practice for Raw SQL

2011-04-13 Thread Sells, Fred
: Re: Best Practice for Raw SQL On Wed, Apr 13, 2011 at 1:38 PM, Sells, Fred <fred.se...@adventistcare.org> wrote: In my case I had to read some legacy data from a different schema on the same MySQL server and it was easy (but perhaps not elegant) to just establish a separate conn

Re: Best Practice for Raw SQL

2011-04-13 Thread Nick Arnett
On Wed, Apr 13, 2011 at 1:38 PM, Sells, Fred wrote: > In my case I had to read some legacy data from a different schema on the > same MySQL server and it was easy (but perhaps not elegant) to just > establish a separate connection using MySQLdb module. You

RE: Best Practice for Raw SQL

2011-04-13 Thread Sells, Fred
] On Behalf Of Jacob Kaplan-Moss Sent: Monday, April 11, 2011 11:51 AM To: django-users Subject: Re: Best Practice for Raw SQL On Mon, Apr 11, 2011 at 7:53 AM, Dan Gentry <d...@gentryville.net> wrote: > Where I run into trouble is that the query returns data in columns, > but not objects

Re: Best Practice for Raw SQL

2011-04-11 Thread Jacob Kaplan-Moss
On Mon, Apr 11, 2011 at 7:53 AM, Dan Gentry wrote: > Where I run into trouble is that the query returns data in columns, > but not objects. That means that I can’t reference an object attribute > using dot notation in my templates or views. Instead, I have to > include each

Best Practice for Raw SQL

2011-04-11 Thread Dan Gentry
My application includes some existing tables from another, non-Django application. One of them does not have an atomic primary key, and I’m not in a position to change that. Therefore, I’m using one raw SQL to access the data. Where I run into trouble is that the query returns data in columns, but