Skip to content

Instantly share code, notes, and snippets.

@ganapathichidambaram
Created November 3, 2021 17:57
Show Gist options
  • Save ganapathichidambaram/974153f257c38300f34cac6d65d392ab to your computer and use it in GitHub Desktop.
Save ganapathichidambaram/974153f257c38300f34cac6d65d392ab to your computer and use it in GitHub Desktop.
Enable SQL Queries on Console for Django App
LOGGING = {
'version': 1,
'filters': {
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue',
}
},
'handlers': {
'console': {
'level': 'DEBUG',
'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
}
},
'loggers': {
'django.db.backends': {
'level': 'DEBUG',
'handlers': ['console'],
'propagate': False,
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment