Debugmate Integration for Django
This guide explains how to integrate debugmate-python into your Django application to capture logs and exceptions.
Installation
To install the debugmate-python package, run the following command:
pip install -i https://pypi.org/simple/ debugmate
Configuration in settings.py
Follow the steps below to configure the logger and middleware in your settings.py file.
1. Logger Configuration
Add the following logging configurations to your settings.py file to capture errors and send them to the Debugmate service.
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', '')
2. Add the Middleware
In your settings.py, add the DebugmateMiddleware to the list of middlewares.
MIDDLEWARE = [
'debugmate.django.middleware.DebugmateMiddleware',
# Other middlewares...
]
3. Running the Application
With the above configuration, Debugmate integration is ready. Your Django application will now send logs and exceptions to the Debugmate service.
Metadata
Release files for debugmate 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| debugmate-0.0.1.tar.gz | 8.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| debugmate-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / debugmate-0.0.1.tar.gz
| Download URL | debugmate-0.0.1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9aa2b35baeb4c826c69f97062f7ef36b07d1fa722831cff73402e4850d282981
|
|
BLAKE2b-256 checksum How to use checksums |
840c21bb8cdb75fa40794fcd890539bec59af6234d70a43ef71a95d0fa5edb7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Release files / debugmate-0.0.1-py3-none-any.whl
| Download URL | debugmate-0.0.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d62d9092cd7cefecc33c67b0da8b390aa7c4f7a0a9cfd1577f3524c1c9875853
|
|
BLAKE2b-256 checksum How to use checksums |
ca4d6ace5ca66896aafda5fcfc0e49657afd97e550e77bb2b598b487c5e07386
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.5
|
Security for debugmate 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.