# 下面语句加到setti中
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console':{ 'level':'DEBUG', 'class':'logging.StreamHandler', }, }, 'loggers': { 'django.db.backends': { 'handlers': ['console'], 'propagate': True, 'level':'DEBUG', }, } } LOGGING
后台显示:
(0.000) SELECT "part"."id", "part"."caption" FROM "part" WHERE "part"."id" = 3; args=(3,)