Опитайте това
# settings.py
DATABASES = {
'default': {
'ENGINE': '...',
'OPTIONS': {
'init_command': "SET log_error_verbosity TO 'verbose'",
},
}
}
Тестова заявка
SELECT setting FROM pg_settings WHERE name = 'log_error_verbosity'