NOTE: This frontend is discontinued, and is no longer being updated.
A slack application that will communicate with Sluggo's REST api.
Currently, installation steps are focused on development. This process will hopefully be simplified once more complete versions of the tracker are available.
To install Sluggo on development machines, perform the following:
-
Create the virtual environment for Sluggo using the command
python3 -m venv env
-
Activate the Sluggo virtual environment.
a. For POSIX platforms (macOS and Linux) run:
source ./env/bin/activate
b. For Windows:
.\env\Scripts\activate.bat
-
Install the dependencies for Sluggo to run using the command
pip install -r ./requirements.txt
-
Set the environment variable
SLACK_DJANGO_KEY
to some random, unique value (only important for production):export SLACK_DJANGO_KEY="not important for non producton"
-
Obtain the Slack Bot's Bot User OAuth Access Token from here, and set the environment variable
SLACK_BOT_TOKEN
to it in your work environment. -
To obtain a request url for Slack to communicate with, install Ngrok and make an account.
-
Activate the virtual environment shown in the Installation steps.
a. For POSIX platforms (macOS and Linux):
source ./env/bin/activate
b. For Windows:
.\env\Scripts\activate.bat
-
Run the following command whenever changes to the database models are made. This is likely necessary whenever new versions of the repository are pulled, or your version of SluggoAPI is otherwise upgraded:
python manage.py makemigrations; python manage.py migrate
-
Run with:
python manage.py runserver
-
In a seperate terminal run:
ngrok http <YOUR DJANGO PORT>
which will give you a url to use for all requests. -
Replace the URLs within the command you are working on in the api's website.
a. For the slash commands you're currently working on, navigate to the slash commands subsection on the Slack API site and replace the hostnames where necessary
b. To get authentication working, navigate to the oauth & permissions subsection on the Slack API site and replace the hostname of the single redirect url.
This project is licensed under the Apache 2.0 License. See LICENSE for more details.