Skip to main content

Discord integration for Django, supporting error reporting via webhooks.

Project description

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'],
    },
}

Project details


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.1.0.tar.gz (4.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.1.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file django-discord-integration-1.1.0.tar.gz.

File metadata

  • Download URL: django-discord-integration-1.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

File hashes

Hashes for django-discord-integration-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1a8f4adeef7286f84e07daf00d58942c911f9d8d8a9ae5971091da09f3ba9182
MD5 8d2909650d50f6e99622b4ea651974c7
BLAKE2b-256 a67adbca8730bb489ac58a947e6e95fcc736edb63608c654094f181daaea35ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_discord_integration-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

File hashes

Hashes for django_discord_integration-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c5c165ea6d623a2e2220e5ffcf556fbfa9e0f147eb3af3bd020b87eddaec780
MD5 907ec23e64c730c53f85a069b6fa60b5
BLAKE2b-256 1b32d295c9466ed978bd7f1c1c0ecb78dac9f020add8355151a2f2c2eede4d3d

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 Pingdom Monitoring Sentry Error logging StatusPage Status page