Re: How to check the SQL that the Django ORM is executing?

2008-03-28 Thread Thomas Guettler
qwerty schrieb: > Hi all, > > I want so see the SQL that the Django ORM is executing behind the > scenes. I know that SQLObject has this but I wanted to see if there is > some similar functionality in Django. Is it? > > Maybe SQLLogMiddleware helps you:

Re: How to check the SQL that the Django ORM is executing?

2008-03-27 Thread Rajesh Dhawan
Hi, On Mar 27, 4:01 pm, qwerty <[EMAIL PROTECTED]> wrote: > Hi all, > > I want so see the SQL that the Django ORM is executing behind the > scenes. I know that SQLObject has this but I wanted to see if there is > some similar functionality in Django. Is it? See:

Re: How to check the SQL that the Django ORM is executing?

2008-03-27 Thread [EMAIL PROTECTED]
It depends, thats better if you want to actively see what queries are being run, this is better if you want to see what SQL a specific query executes. On Mar 27, 3:24 pm, shabda <[EMAIL PROTECTED]> wrote: > wouldn't getting the queries from connection.queries be abetter > approach? > > On Mar

Re: How to check the SQL that the Django ORM is executing?

2008-03-27 Thread shabda
wouldn't getting the queries from connection.queries be abetter approach? On Mar 28, 1:15 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw... > > or > > you can make a function like this: > > In [19]: def show_sql(query):

Re: How to check the SQL that the Django ORM is executing?

2008-03-27 Thread [EMAIL PROTECTED]
http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-sql-queries-django-is-running or you can make a function like this: In [19]: def show_sql(query): : clauses = query._get_sql_clause() : return 'SELECT %s %s' % (', '.join(clauses[0]), clauses[1])

How to check the SQL that the Django ORM is executing?

2008-03-27 Thread qwerty
Hi all, I want so see the SQL that the Django ORM is executing behind the scenes. I know that SQLObject has this but I wanted to see if there is some similar functionality in Django. Is it? Thanks, Angel --~--~-~--~~~---~--~~ You received this message because