Setup python virtual environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
For MacOS postgres dependency: brew install postgresql@15
Initialize database
python manage.py migrate
- Run tests:
python manage.py test
- Run backend server:
python manage.py runserver
- Run migrations:
python manage.py migrate
- Create new migrations:
python manage.py makemigrations
- Create admin superuser:
python manage.py createsuperuser
- Preferences → Languages & Frameworks → Django
- Enable Django Support, Specify Django Project Root, Specify Settings
- Preferences → Project: ... → Python Interpreter
- Add new python environment using venv setup above
pip install my-new-dependency
pip freeze > requirements.txt
git checkout deploy # switch to deploy branch
git merge main # merge changes from main branch
cd client
rm -rf build # remove old build bundle
npm i
npm run build # build frontend bundle
git add .
git commit -m "build bundle" # commit built bundle to the deploy branch
git push heroku deploy:main # deploy changes to heroku
git checkout main