- Django
- Postgresql
- Sendgrid - for Email
- Azure Blob storage - for storing sermons
Make sure you have the following installed
- Python 3
- npm
- Postgresql
Create a copy of the "env.example" file and name it ".env"
Make sure you have the following variables.
- DEBUG
- off=False and on=True - If you are developing then set to on
- DB_USER
- DB_PASSWORD
- DB_HOST
Delete the variables you dont want to use.
In terminal run the following command. This will create a virtual enviroment a folder named venv where it will install the packages for this project.
python -m venv venv
To activate the virtual enviroment run:
.\venv\Scripts\activate
To deactivate the virtual enviroment run:
deactivate
Make sure you activated the python virtual environment. If you see (venv) then your good to continue.
Install python packages:
python -m pip install -r requirements.txt
Install npm modules:
npm install
Make sure you did the following
- Make sure you have Postgresql installed
- Create a database named "church_db"
- Have python virtual env activated
Run migrations and create a super user
python manage.py migrate
python manage.py createsuperuser
If you want to add some sample data run:
python manage.py addsampledata
To run django run:
python manage.py runserver
At this point you can navigate with a web browser to the following: http://127.0.0.1:8000
To check coverage run:
coverage run manage.py test app_name -v 2
coverage html