Skip to content

Commit

Permalink
Merge pull request #37 from front-seat/staging
Browse files Browse the repository at this point in the history
All changes necessary to support our $1000 and $0 tests
  • Loading branch information
davepeck authored May 15, 2024
2 parents a034b32 + c46b394 commit d951728
Show file tree
Hide file tree
Showing 77 changed files with 3,070 additions and 2,020 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ indent_size = 2

[*.py]
indent_size = 4

7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"source.fixAll": "explicit"
}
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
},
"emmet.includeLanguages": {
"django-html": "html"
},
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ We spend all our hipster tech tokens for this project to help us build a front-e

- [HTMX](https://htmx.org/) with [django-htmx](https://github.com/adamchainz/django-htmx)
- [css-scope-inline](https://github.com/gnat/css-scope-inline)
- [surreal](https://github.com/gnat/surreal?tab=readme-ov-file)
- [htpy](https://htpy.dev/) 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: so far, I sorta like HTMX but don't love how I've structured everything with the other two. And I hate Django templates as much as I remember.)
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 [django-slippers](https://github.com/mixxorz/slippers), [django-template-partials](https://github.com/carltongibson/django-template-partials), and [django-components](https://github.com/EmilStenstrom/django-components). And don't forget the [django-htmx-patterns](https://github.com/spookylukey/django-htmx-patterns/) documentation.)
(Others under consideration include [surreal](https://github.com/gnat/surreal?tab=readme-ov-file), [django-slippers](https://github.com/mixxorz/slippers), [django-template-partials](https://github.com/carltongibson/django-template-partials), and [django-components](https://github.com/EmilStenstrom/django-components). And don't forget the [django-htmx-patterns](https://github.com/spookylukey/django-htmx-patterns/) documentation.)

For code cleanliness, we also use:

Expand All @@ -28,7 +28,9 @@ For code cleanliness, we also use:

1. Make sure you have python 3.12 installed
1. Create and enable a python virtualenv with `python -m venv .venv; source .venv/bin/activate`
1. Install the python dependencies with `pip install -r requirements.txt` or `pip install ".[dev]"`
1. Install the python dependencies with `pip install -r requirements.txt`
1. Get postgres set up. If you've got docker installed, `./scripts/dockerpg.sh up`
1. Configure your environment variables. (See `.env.sample` and `settings.py`)
1. Run the app. `./manage.py runserver` and visit http://localhost:8000/

New tests.
10 changes: 4 additions & 6 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
{
"compilerOptions": {
"target": "ES6",
"module": "CommonJS",
"module": "ESNext",
"checkJs": true,
"allowJs": true,
"noEmit": true
"strictNullChecks": true,
"lib": ["dom", "es6"]
},
"include": [
"server/static/js/surreal.js",
"server/static/js/css-scope-inline.js"
]
"include": ["server/**/*.js", "server/**/*.mjs"]
}
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ django_settings_module = "server.settings"
[tool.ruff]
exclude = [".venv", "**/migrations/**"]

[tool.ruff.lint.per-file-ignores]
"**/components/*.py" = ["E501"]

[tool.ruff.lint]
extend-select = [
"E", # style errors
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ django-stubs>=4.2.7
django>=5,<6
djlint>=1.34.1
gunicorn>=21,<22
htpy>=24.4.0
httpx>=0.20.0
markdown>=3.6.0
mypy>=1.9.0
pillow>=10.2.0
psycopg[binary]>=3,<4
pydantic>=2.7.0
ruff>=0.3.4
types-markdown>=3.6.0
uvicorn[standard]>=0.29.0
whitenoise>=6,<7
20 changes: 0 additions & 20 deletions server/static/img/voter_bowl_logo.svg

This file was deleted.

8 changes: 0 additions & 8 deletions server/static/js/fireworks.js

This file was deleted.

Loading

0 comments on commit d951728

Please sign in to comment.