If you’re using Django 1.3:
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())
More Related Contents:
- Django queries – id vs pk
- Unique fields that allow nulls in Django
- Accelerate bulk insert using Django’s ORM?
- View doesn’t return HttpResponse
- What’s the difference between django OneToOneField and ForeignKey?
- How to concatenate strings in django templates?
- How to group by AND aggregate with Django
- What’s the recommended approach to resetting migration history using Django South?
- Django ModelChoiceField: filtering query set and setting default value as an object
- How do I add multiple arguments to my custom template filter in a django template?
- How to automatically login a user after registration in django
- Django model instances primary keys do not reset to 1 after all instances are deleted
- How to fetch static CSS files with django on IIS?
- Check permission inside a template in Django
- 405 POST method not allowed
- How to remove all relations from manytomany?
- Multiple images per Model
- How to access outermost forloop.counter with nested for loops in Django templates?
- How to get URL of current page, including parameters, in a template?
- Django redirect() with anchor (#) parameters
- resize image on save
- Django release 1.5: ‘url’ requires a non-empty first argument. The syntax changed in Django 1.5
- django most efficient way to count same field values in a query
- optimal architecture for multitenant application on django
- How can I correctly set DJANGO_SETTINGS_MODULE for my Django project (I am using virtualenv)?
- Sharing models between Django apps
- Django: __in query lookup doesn’t maintain the order in queryset
- Django self-recursive foreignkey filter query for all childs
- Extending Django Admin Templates – altering change list
- How do I display the value of a Django form field in a template?