Use Twilio to create automatic appointment reminders for your business's clients.
This project is preconfigured to run on Heroku. Deploy it now:
To start the Celery worker process, which sends the SMS reminders asynchronously, you need to change a few settings in your Heroku dashboard:
- After the app deploys, click the Manage app button to view this app's settings
- Click Edit in the top right corner of the dashboard
- Change the app to use Free pricing - the first option
- Click the toggle for the worker process, enabling it for free pricing
- Click Save in the top right corner
Now you're all set.
To view your app, click the ... menu in the top right corner and select Open app.
This project is built using the Django web framework. It runs on Python 2.7+ and Python 3.4+.
To run the app locally, first clone this repository and cd
into its directory. Then:
- Create a new virtual environment:
- If using vanilla virtualenv, run
virtualenv venv
and thensource venv/bin/activate
- If using virtualenvwrapper, run
mkvirtualenv appointments
- If using vanilla virtualenv, run
- Install the requirements with
pip install -r requirements.txt
- Start a local PostgreSQL database and create a database called
appointment_reminders
- If on a Mac, I recommend Postgres.app. After install, open psql and run
CREATE DATABASE appointment_reminders;
- If Postgres is already installed locally, you can just run
createdb appointment_reminders
from a terminal
- If on a Mac, I recommend Postgres.app. After install, open psql and run
- Run the migrations with
python manage.py migrate
- Optionally create a superuser so you can access the Django admin:
python manage.py createsuperuser
- Copy the
.env_example
file to.env
, and edit it to include your Twilio API credentials (found at https://www.twilio.com/user/account/voice) - Run
source .env
to apply the environment variables (or even better, use autoenv) - Start the development server:
python manage.py runserver
This project uses Celery to asynchronously send SMS reminders to users. To start the Celery process:
- This project uses Redis as its task queue. Install and start Redis
- Start a new terminal session and activate your virtual environment
- Source the
.env
file if you're not using autoenv - Start the Celery worker with the command:
celery -A appointments.settings worker -l info
You can then visit the application at http://localhost:8000/.
You can run the tests locally through coverage:
$ coverage run manage.py test --settings=appointments.settings.test
You can then view the results with coverage report
or build an HTML report with coverage html
.