Staff app. Syncs with Slack.
- Install the app.
$ pip install django-politico-staff
- Add the app to your Django project and configure settings.
INSTALLED_APPS = [
# ...
'rest_framework',
'tokenservice',
'staff',
]
#########################
# staff settings
# Token for a slack app with users:read & users:read.email permission scopes
STAFF_SLACK_API_TOKEN = os.getenv("SLACK_API_TOKEN")
Developing python files? Move into example directory and run the development server with pipenv.
$ cd example
$ pipenv run python manage.py runserver
- Run the make command to setup a fresh database.
$ make database
- Add a connection URL to the
.env
file.
DATABASE_URL="postgres://localhost:5432/staff"
- Run migrations from the example app.
$ cd example
$ pipenv run python manage.py migrate