海神


让Django自带的服务器输出SQL语句的方法

2012-07-31
#django #python

修改settings.py里面的LOGGING,加入: LOGGING = {     ...     'handlers': {         ...         'console': {             'level': 'DEBUG',             'class': 'logging.StreamHandler',         },         ...     },     ...     'loggers': {         ...         'django.db.backends': {             'level': 'DEBUG',             'handlers': ['console'],         },         ...     },     ... }


blog comments powered by Disqus