WHAT IS THE SITE FOR?
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.
WHAT IS THE DAILY OFFICE?
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 issues and see where you might help out. Updates to documentation and tests (both of which are largely missing) are also welcome.
- Python 3.7 (other 3.x may work)
- Node with npx
Setting up a development environment
- Clone or fork the project from
- Connect to Postgres
sudo 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
psql -U dailyoffice dailyoffice < site/dailyoffice_2020_01_12.sql
ALTERNATE: You may import the data into a clean database using the provided
import Django management commands
Setup up python environment
- Create a Python virtual environment
python3 -m venv env
- Load virtual environment
- Install Python Requirements
pip install -r requirements.txt
npx webpack --watch
Run development server (in separate terminal)
- Collect static assets
python manage.py collectstatic
- Start development server
python manage.py runserver
- The site will be accessible locally at
Generate static site and deploy
- Set the
python manage.py collectstaticfrom the
python manage.py distill-localfrom the
sitedirectory. This builds a static copy of the site in the
netlfy deploy --prodfrom
static_exportdirectory (must be done by site owner that has Netlify credentials)
Code formatting standard
- Please use
blackto format code with a line length of 119 beore submitting a pull request
find . -iname "*.py" | xargs black --target-version=py37 --line-length=119from the
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 in
website\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