On Feb 20, 11:37 am, Derek <gamesb...@gmail.com> wrote:
> I am running on my dev machine, working with Django 1.1, Python 2.5.2, Mysql
> 5.0.
>
> My settings.py file has DEBUG = True
>
> I have done this:
>
> $ cd project-dir
> $ python manage.py shell
>
> >>> from django.db import connection
> >>> connection.queries
>
> All that happens is I get a [] result, and am back to the Python prompt
> (>>>).
>
> No queries, as shown 
> here:http://docs.djangoproject.com/en/dev/faq/models/#how-can-i-see-the-ra...
>
> are ever displayed, as I browse Admin, edit records etc.
>
> What else do I need to do?
>
> Thanks
> Derek

connection.queries only shows the queries executed in the current
process - so if you call some ORM functions in your shell, you will
see the SQL there. You won't see the queries from your server process
in the shell.

If you do want to see the queries the server is running, your best bet
is to install the Django debug toolbar: 
http://github.com/robhudson/django-debug-toolbar
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to