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:
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:
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
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):
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])
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
6 matches
Mail list logo