Skip to main content

Django Discord Integration

Discord integration for Django, supporting error reporting via webhooks.

This app comes with two message handlers: DiscordMessageHandler and SimpleDiscordMessageHandler. DiscordMessageHandler sends all the information related to the message, such as a traceback if there is one, while the SimpleDiscordMessageHandler only sends the title.

Installation

$ pip install django-discord-integration

In your settings.py, add the following:

INSTALLED_APPS = (
    'discord_integration',
    ...
)

Next, migrate the database:

$ python manage.py migrate

Finally, create a Discord integration object in the Django admin site. Set the Discord webhook URL as well as the bot username and avatar URL if necessary. You can create multiple objects to direct different logs to different channels. The default object should the name default.

Sample Logging Configuration

LOGGING = {
    'handlers': {
        'discord_integration': {
            'level': 'ERROR',
            'class': 'discord_integration.log.DiscordMessageHandler',
            'model_name': 'default',  # OPTIONAL: specify a name to use a different integration configuration.
        },
    },
    'loggers': {
        'handlers': ['discord_integration'],
    },
}

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_discord_integration-1.3.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_discord_integration-1.3.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file django_discord_integration-1.3.0.tar.gz.

File metadata

File hashes

Hashes for django_discord_integration-1.3.0.tar.gz
Algorithm Hash digest
SHA256 7e0bfb5fd6a6fd11b04ef1f14ec20d75e5d50fb0e87e391e1311dd1f203ab967
MD5 2da1787d8517cc6f5aaa7536187789e9
BLAKE2b-256 2533a83fc43a6d34b6add5397a7c54d53e5653878446b56b7a8d02a5af85a84d

See more details on using hashes here.

File details

Details for the file django_discord_integration-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_discord_integration-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e5747ba7797df56a6cf080324be6880adfb4a3c690bad1a4624ddaf8000cc1
MD5 1029d1ac15b7a3b89eb8b77917d37b4d
BLAKE2b-256 e277f216d0aa6bd7b6101773bcd6156f8986fb773d821d5998303318ba846a35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page