This component serves as the admin pages for the Take Back Day map and texting.
Variable |
Description |
---|---|
FIREBASE_URL |
URL for the Firebase DB. ex. https://tdb.firebase.io |
FIREBASE_API_KEY |
API Key used for the Firebase DB calls. |
FIREBASE_SECRET |
Database secret for your firebase account. More info where to get the secret here |
FIREBASE_ID |
Your user ID for the firebase account. |
FIREBASE_EMAIL |
Your email for the firebase account. |
UPCOMING_TBD |
Date formatted value for the next TBD text blast. Ex. 2018-04-23 09:00:00 |
TWILIO_API_KEY |
API Key for Twilio API Calls |
TWILIO_SECRET_KEY |
Secret Key for Twilio Calls |
TWILIO_SOURCE_NUMBER |
Source number provided by twilio that will send / receive messages |
SENDGRID_API_KEY |
SendGrid API for sending emails |
$ pipenv install
For PostGreSQL
$ createdb takebackday
$ python manage.py migrate
$ python manage.py collecstatic
$ python manage.py loaddata locations
$ python manage.py loaddata message
Note: locations
and message
are the initial data for all the locations and messages.
In your Heroku project root:
heroku addons:create redistogo
heroku scale worker=1
heroku scale clock=1
These commands can be incorporated to your cron / scheduled tasks.
To Pull data from firebase:
$ python manage.py pull_data
To send confirmation texts/emails:
$ python manage.py send_confirmation
To send TakeBackDay day-of reminders:
$ python manage.py send_reminder (!!! Under Construction)
Make sure you have Python installed properly. Also, install the Heroku CLI and Postgres.
$ git clone [email protected]:heroku/python-getting-started.git
$ cd python-getting-started
$ pipenv install
$ createdb twilio_mgr
$ python manage.py migrate
$ python manage.py collectstatic
$ heroku local