Skip to content

Instantly share code, notes, and snippets.

@okalachev
Created March 26, 2013 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okalachev/5246537 to your computer and use it in GitHub Desktop.
Save okalachev/5246537 to your computer and use it in GitHub Desktop.
Print every SQL query in Django Shell
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment