Greetings Malcom!

I think you are right, is it possible in django to log all SQL
statement?

Cheers!

On Mar 9, 3:57 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-03-09 at 14:50 +0000, Iapain wrote:
> > Hello,
>
> > I am writing a SQL logviewer for sql queries fired by django. If I use
> > below code then i get an empty list of dictionary.
>
> > from django.db import conneciton
> > from django.conf import settings
> > debug = settings.DEBUG #btw its always True, because i set it to true
> > in my settings.py
> > settings.DEBUG = True
> > print str(connection.queries)
>
> I suspect you may have the wrong idea of how this works. The
> connection.queries list is flushed for each new request. So you cannot
> use it as a record of every query you've ever executed. In a web-server
> driven environment, it will only show you the queries executed so far by
> this request.
>
> Regards,
> Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to