This is a django + webpack project, styled with bootstrap! (sorry about the webpack, but haven't been able to update...)
We used to host on Heroku but are moving to render.com
-
Clone the codebase
-
Download/install docker however you choose. https://www.docker.com/products/docker-desktop/
docker compose build
This command will do all the requirements downloading and package installation necessary. Everything but static files and database migrations.
-
docker compose run static npm run build -
docker compose run web python manage.py collectstatic -
docker compose run web python manage.py migrate
(or makemigrations if you're making )
docker compose up
serves the site
- add a local django admin/super user:
docker compose run web python manage.py createsuperuser
- log in:
http://localhost:8000/admin/login/?next=/admin/
- create models via the admin as needed
coming soon! (hopefully)
docker compose run web /bin/bash -c "black . && isort --profile black
When writing new strings, surround blocks of text with {% blocktrans %}...{% endblocktrans %}.
If any variables appear within the text, they should be translated (or {% trans $var noop %}) independently.
python manage.py makemessages # add blocks to translation file
# fill in translations in .po files
python manage.py compilemessages # convert .po to .mo optimized format
Make a PR with a checklist:
- update the how to vote page
- add new candidates
- change the years found in text (landing page, etc.)
- change the money functions or finally update them for generic years (sorry)
- figure out the new ocpf.us format