Daily Office, Book of Common Prayer 2019 (https://www.dailyoffice2019.com)
This project is used to build the website https://www.dailyoffice2019.com. It is a Django application written in Python (to be installed in a development environment). It is used to produce a static html and javascript site which can then be deployed to the production environment.
The site invites you to join with Christians around the world in praying with the Church, at any time or in any place you may find yourself. It makes it easy to pray daily morning, midday, evening, and compline (bedtime) prayer without flipping pages, searching for scripture readings or calendars, or interpreting rubrics. The prayers are presented from The Book of Common Prayer (2019) of the Anglican Church in North America and reflect the ancient patterns of daily prayer Christians have used since the earliest days of the church.
Daily Morning Prayer and Daily Evening Prayer are the established rites (offices) by which, both corporately and individually, God’s people annually encounter the whole of the Holy Scriptures, daily confess their sins and praise Almighty God, and offer timely thanksgivings, petitions, and intercessions.
Pull requests are welcome. Take a look at the Github issues and see where you might help out. Updates to documentation and tests (both of which are largely missing) are also welcome.
- Python 3.12
- Node 16
- PostgreSQL
- Memcached 1.6
The project is known to work with these versions, although it may also work with more recent versions.
If you are using macOS, all the above requirements may be installed with Homebrew.
- Clone or fork the project from
https://github.com/blocher/dailyoffice2019 cd dailyoffice2019cp app/.env.development app/.env.localcp site/website/.env.example site/website/.env
- Connect to Postgres
psql -d postgres - Create database
create database dailyoffice; - Create user
create user dailyoffice with password 'password'; - Grant permissions
grant all privileges on database dailyoffice to dailyoffice; - Exit postgres
\q - Import
unzip -p site/dailyoffice_2024_01_30.sql.zip dailyoffice_2024_01_30.sql | psql -U dailyoffice dailyoffice
- Go to the project's
/sitedirectory - Create a Python virtual environment
python3 -m venv env - Load virtual environment
source env/bin/activate - Install Python Requirements
pip install -r requirements.txt
- Collect static assets
python manage.py collectstatic - Start development server
python manage.py runsslserver - The API documentation will be accessible locally at
https://127.0.0.1:8000/api/
- Go to the project's
/appdirectory - Follow the setup instructions in the client README: app/README.md
- The frontend will be accessible locally at
http://127.0.0.1:8080
The patrons Django app can send patronal feast and family anniversary reminders by SMS through Twilio. The calendar
feed is protected by an admin-rotatable token; create or rotate that token in Django admin under Patrons -> Calendar
feeds, then subscribe to the generated .ics URL in Google Calendar or Outlook.
To configure Twilio:
- Create or log into a Twilio account at https://console.twilio.com/.
- In the Twilio Console, buy or select an SMS-capable United States phone number. Twilio's quickstart documents this
under Phone Numbers -> Manage -> Buy a number, and the number should be copied in E.164 format such as
+15551234567. - In the Account Dashboard, copy the Account SID and Auth Token.
- Add these variables to the deployment environment or
site/website/.env:TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_FROM_NUMBERPATRONS_SMS_ENABLED=True
- If sending to United States mobile recipients from a 10-digit long code, complete A2P 10DLC registration in the Twilio Console before enabling production reminders.
- Send one test reminder, then confirm the result in Django admin under Patrons -> Text message sends.
Twilio pricing changes over time, but as of the currently published Twilio pricing pages, US SMS starts at $0.0083
per sent or received message segment, a leased US long-code number is listed at $1.15 per month, and sole proprietor
A2P 10DLC registration is listed at about $4 one-time brand registration, $15 one-time campaign vetting, and $2
per month per campaign. Carrier fees, compliance fees, failed-message fees, and future price changes can apply. Check
the official Twilio pages before budgeting: Twilio SMS quickstart,
Twilio US SMS pricing, and
Twilio A2P 10DLC overview.
- Please use
blackto format code with a line length of 119 beore submitting a pull request find . -iname "*.py" | xargs black --target-version=py311 --line-length=119from thesitedirectory
The application is built around several Django "apps". The most important are:
- website: This is the base site. All settings are defined in
website\settings.pyand all paths are defined inwebsite\routes.py. Start here. - office: This is where the bulk of the work is down to generate each Office.
- churchcal: This is used to build the church calendar. It currently supports both the Anglican Church in North America and the Episcopal Church calendars (though only ACNA is currently used for this project)
- bible: This is used to retrieve bible passages from various sources (currently only Bible Gateway, but others such as the ESV API are coming soon)
- psalter: This is used to retrieve passages from the Psalms (currently only the renewed Coverdale translation in the Book of Common Prayer 2019)
NOTE: churchcal, bible, and psalter apps may be spun off as separate projects soon and added as dependencies to this project
- For feature requests, please submit an issue and label it "enhancement"
- For bug reports, please submit an issue and label it "bug"
- Email the original creator Ben @ feedback@dailyoffice2019.com
- Join the Facebook discussion at: https://www.facebook.com/groups/dailyoffice/