Answers for "Django LogEntry example"

1

django log sql queries

# Add below code in the settings.py

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'],
        }
    }
}
Posted by: Guest on September-15-2021
0

login system in django

LOGOUT_REDIRECT_URL = 'your_url'
Posted by: Guest on January-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language