Skip to main content

A Django app to help integrate Slack

Project description

Django Slack Integration

This application helps you to integrate your existing Django application with Slack.

It provides you with

  • Models - needed to keep information from Slack API
  • Decorators - help you to write implementation of your Slack endpoints
  • Authorisation backend - allows you to pair your existing user model with your Slack users
  • Views - OAuth callbacks for "Add To Slack" and "Login With Slack" actions

Installation

  1. Add 'slack_integration' to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'slack_integration',
        ...
    ]
    
  2. Include the urls in your project urls.py like this:

    path('slack/', include(('slack_integration.urls', 'slack_integration'), namespace='slack_integration')),
    
  3. Run python manage.py migrate to create the slack_integration models.

  4. Add slack_integration.auth_backends.SlackAuthenticationBackend to your AUTHENTICATION_BACKENDS

    AUTHENTICATION_BACKENDS = [
        'django.contrib.auth.backends.ModelBackend',
        'slack_integration.auth_backends.SlackAuthenticationBackend',
    ]
    
  5. Update your settings.py

    SLACK_CLIENT_ID=""
    SLACK_CLIENT_SECRET=""
    SLACK_SIGNING_SECRET=""
    
    SLACK_LOGIN_OAUTH_REDIRECT_URL=""
    SLACK_INSTALL_OAUTH_REDIRECT_URL=""
    

Project details


Download files

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

Files for django-slack-app, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size django_slack_app-1.0.0-py3-none-any.whl (14.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size django-slack-app-1.0.0.tar.gz (10.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page