Django Error Tracking
DebugMate tracks common Django errors, covering common web application issues.
Tracked Errors
Supported by Django 5.1.1 with Python 3.12
Class Not Found: Indicates a missing class.
Controller Not Found: Controller could not be located.
Division by Zero: Dividing by zero in mathematical operations.
File Not Found: Missing file in file-based operations.
Import Error: Issues in importing modules.
Improperly Configured: Django setup or settings misconfiguration.
Method Not Found: Undefined method call.
Multiple Objects Returned: Unexpected multiple objects in queries.
Permission Denied: Unauthorized actions.
Query Error: SQL query issues.
Simple Exception: General exceptions.
Suspicious Operation: Suspicious request or operation detected.
Syntax Error: Syntax issues in code.
Template Does Not Exist: Missing template in rendering.
Type Error: Mismatched types in operations.
Undefined Variable: Undefined variable usage.
Validation Error: Validation-related issues.
View Not Found: Missing view in request handling.
Installation Process
Step 1: Install the DebugMate package using `pip:
pip install -i https://pypi.org/simple/ debugmate
Step 2: Set your environment variables, you can find your key in the DebugMate dashboard.
Step 3: Configure your settings.py
file:
import os
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'root': {
'level': 'ERROR',
'handlers': ['debugmate'],
},
'handlers': {
'debugmate': {
'level': 'INFO',
'class': 'debugmate.handlers.debugmate_handler.DebugmateHandler',
},
}
}
DEBUGMATE_TOKEN = os.getenv('DEBUGMATE_TOKEN', '')
DEBUGMATE_DOMAIN = os.getenv('DEBUGMATE_DOMAIN', '')
Step 4: Add the following middleware to your settings.py
file:
MIDDLEWARE = [
'debugmate.django.middleware.DebugmateMiddleware',
# Other middlewares...
]