Copyright and other protections apply. Please see the accompanying LICENSE and CREDITS file(s) for rights and restrictions governing use of this software. All rights not expressly waived or licensed are reserved. If those files are missing or appear to be modified from their originals, then please contact the author before viewing or using this software in any capacity.
Introduction¶
django-emojiwatch
is a bare bones Slack app for posting custom emoji updates to a designated channel.
It is implemented as a Django app.
It was loosely inspired by Khan Academy’s emojiwatch
, which provides similar functionality, but for hosting on on Google App Engine.
License¶
django-emojiwatch
is licensed under the MIT License.
See the LICENSE file for details.
Source code is available on GitHub.
Installation¶
Django¶
Installation can be performed via pip
(which will download and install the latest release):
% pip install django-emojiwatch
...
Alternately, you can download the sources (e.g., from GitHub) and run setup.py
:
% git clone https://github.com/posita/django-emojiwatch
...
% cd django-emojiwatch
% python setup.py install
...
Now you can add it to your DJANGO_SETTINGS_MODULE
:
INSTALLED_APPS = (
# ...
'emojiwatch',
)
EMOJIWATCH = {
'slack_auth_token': '...',
'slack_verification_token': '...',
}
And add it to your site-wide URLs:
from django.conf.urls import include, url
urlpatterns = (
# ...
url(
r'^emojiwatch/', # or werever you want
include('emojiwatch.urls'),
),
# ...
)
If you haven’t already, you’ll also need to enable the admin site for your Django installation.
Configuring Token Encryption in Django’s Database¶
Notes associated with a watcher are encrypted in the Django database using django-fernet-fields
.
By default, the encryption key is derived from the SECRET_KEY
Django setting.
To override this, use the FERNET_KEYS
and FERNET_USE_HKDF
settings.
See the docs for details.
Slack App and Watcher Setup¶
For illustration, we’ll create a workspace-based Slack app, but we could just as easily use a traditional one.
TODO: Finish this section.
Requirements¶
You’ll a Slack account (and admin approval) for setting up your app. A modern version of Python is required:
django-emojiwatch
has the following dependencies (which will be installed automatically):
Django
(1.8 or higher)django-fernet-fields
future
slacker