On Tue, 2009-11-17 at 16:15 -0800, Continuation wrote:
> I'm running a django project (actually a Pinax project) on the
> development server.
> 
> At my settings.py I made sure DEBUG = True
> 
> Then I hit a few pages that for sure resulted in hitting the database.
> 
> Then I did "python manage.py shell" to bring up the interactive
> console.
> 
> Next I tried to look at the raw SQl queries that were generated by
> Django:
> 
> In [2]: from django.db import connection
> In [3]: connection.queries
> Out[3]: []
> 
> Why is connection.queries empty? I tried this several times with the
> same results.
> 
> What have i missed?

Probably you missed the fact that your webserver runs Django in totally
different processes than your shell. So you really can't expect that you
see any queries since you don't have executed any in your shell process.

Try debug toolbar for example to be able to see what actually happens
under the hood.

-- 

Jani Tiainen

--

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=.


Reply via email to