Prepare for the ultimate showcase showdown. https://voterbowl.org/
We use:
We spend all our hipster tech tokens for this project to help us build a front-end directly in Django-land. In particular, we use:
- HTMX with django-htmx
- css-scope-inline
- htpy for HTML building, rather than Django templates (with a small handful of exceptions).
Having never used any of these toys before, we'll see how this pans out. (Update: I'm going to go back and remove css-scope-inline
when I have a chance, in favor of, y'know, just being more careful with top-level CSS. htpy
is better than Django templates for our purposes but not without its friction and pain.)
(Others under consideration include surreal, django-slippers, django-template-partials, and django-components. And don't forget the django-htmx-patterns documentation.)
For code cleanliness, we also use:
- Make sure you have python 3.12 installed
- Create and enable a python virtualenv with
python -m venv .venv; source .venv/bin/activate
- Install the python dependencies with
pip install -r requirements.txt
- Get postgres set up. If you've got docker installed,
./scripts/dockerpg.sh up
- Configure your environment variables. (See
.env.sample
andsettings.py
) - Run the app.
./manage.py runserver
and visit http://localhost:8000/
New tests.