Refactor: extract edit UI HTML into bincio/edit/templates/edit.html
The 285-line _HTML string literal in edit/server.py is replaced by a template file loaded at request time. The route handler is unchanged in behaviour — it still substitutes __SITE_URL__, __SPORT_OPTIONS__, and __STAT_CHECKBOXES__ before returning the response. Five new tests cover: 200 response, form presence, site_url injection, no unresolved placeholders, and template file existence on disk.
This commit is contained in:
+1
-1
@@ -490,7 +490,7 @@ def test_activity_geojson_missing_geometry(client, tmp_path, authenticated_sessi
|
||||
| # | Step | Status |
|
||||
|---|---|---|
|
||||
| 1 | Extract shared image utilities → `bincio/shared/images.py` | Done |
|
||||
| 2 | Extract HTML template → `bincio/edit/templates/edit.html` | Not started |
|
||||
| 2 | Extract HTML template → `bincio/edit/templates/edit.html` | Done |
|
||||
| 3 | Split `serve/server.py` into `deps.py` + `routers/*` | Not started |
|
||||
| 4 | Narrow broad `except Exception:` catches | Not started |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user