[Answered ]-Django โ€“ see the debug error on the server

1๐Ÿ‘

โœ…

Add this to your settings.py:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': True,
    'formatters': {
        'verbose': {
            'format': '%(levelname)s [%(asctime)s] %(module)s %(message)s'
        },
        'simple': {
            'format': '%(levelname)s %(message)s'
        },
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'simple'
        },
    },
    'loggers': {
        'django': {
            'handlers': ['console'],
            'propagate': True,
            'level': 'DEBUG',
        },
    }
}

the console will show the error details

1๐Ÿ‘

Look at https://docs.djangoproject.com/en/1.7/howto/error-reporting/

Any time an error is raised, you can get an email or write to a file, with the information about the error.

๐Ÿ‘คthomas

Leave a comment