- Python 97.3%
- TypeScript 1.6%
- Dockerfile 1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Closes #41 ## What Export options on `PdfExportJob`, for every target (validated version, current state, spec extract): | Field | Values | Default | |---|---|---| | `root_place` | a place of the exported project (rejected together with `spec`) | project root / spec's place | | `max_depth` | integer >= 0, relative to the root place | unlimited | | `layout` | `tree` / `by_place` | `tree` | | `group_by_theme` | boolean | `false` | The default template now always starts with a **table of contents** (page numbers via `target-counter`, internal links, PDF bookmarks), and renders both layouts with or without theme chapters. In `by_place`, each place section shows its full path and links to its parent and child places; in both layouts each spec links to the spec it refines and to its refinements. Targets cut from the document (by root place, depth, or another theme chapter) render as plain text. ## How - New pure module `apps/exports/context.py` assembles the context from plain place/spec/theme rows; `snapshot.py` now only reads rows (frozen snapshot or live state), and `fixtures.py` builds the preview context with the same function, so the three can't drift apart. - Backward compatible: `root` (ungrouped tree) is unchanged for existing custom templates; new keys are `export`, `places`, `themes`, `toc`, and per node `anchor`/`depth`/`path`/`parent`/`child_places`, per spec `anchor`/`refines`/`refined_by`. - `POST /api/pdf-templates/preview/` accepts `layout`/`group_by_theme`. - Download filename gets a `-<place-slug>` / `-p<depth>` suffix when those options are set. - Migration `0004_pdfexportjob_export_options`. ## Tests 234 passed (23 new: context assembly on the fixture rows, snapshot context options, API validation/defaults/filenames, and a real WeasyPrint render of all 4 layout x grouping combinations checking internal links and bookmarks). pylint 10/10, autopep8 clean, bandit clean. Also checked the rendered PDFs visually (TOC with page numbers, by-place sections with links). Frontend dialog follows in thierryade/frontend. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01CrK5Cbdm97HrbhC9wPMLyu Reviewed-on: #42 |
||
| .forgejo/workflows | ||
| apps | ||
| config | ||
| deploy | ||
| e2e | ||
| .env.example | ||
| .gitignore | ||
| .pylintrc | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| LICENSE | ||
| manage.py | ||
| package.json | ||
| pnpm-workspace.yaml | ||
| pytest.ini | ||
| README.md | ||
| renovate.json | ||
| requirements-dev.txt | ||
| requirements-gilles.txt | ||
| requirements-spa.txt | ||
| requirements.txt | ||
| tox.ini | ||
| tsconfig.json | ||
| wdio.conf.ts | ||
thierryade/backend
API Django + DRF de Thierryade — gestion de spécifications de projets
(organisations, projets, découpage spatial en places, specs versionnées
avec cycle brouillon/validé, raffinage, suivi d'implémentation). Voir le
dépôt soeur thierryade/frontend (SPA Vue 3, pas encore scaffoldé).
Plan complet : voir la mémoire du projet et le plan d'implémentation associé (session de conception du 2026-10-14).
Développement local
cp .env.example .env
python3 -m venv .venv && .venv/bin/pip install -r requirements-dev.txt
.venv/bin/python manage.py migrate
.venv/bin/python manage.py runserver
Sans DATABASE_URL configuré, le projet retombe sur SQLite en local.
Pas de Celery/RabbitMQ/Redis dans ce projet (aucun traitement
asynchrone identifié dans le besoin).
Tests
tox # pytest + couverture, lint (pylint), format-check, bandit
tox -e format # reformate avec autopep8
État actuel
Scaffold initial : apps.core (health check), apps.accounts (OIDC
Authentik via mozilla-django-oidc, pas de résolution d'identité externe
contrairement à argus/drh -- les droits viennent entièrement de
apps.orgs), apps.orgs (Organization/Project + memberships à
rôles ordinaux READ/READ_WRITE/SPACE_ADMIN, résolution du rôle effectif),
apps.specs (Place/Spec/SpecVersion/SpecTest/Refinement/
ProjectVersion avec la machine à états complète : immutabilité d'une
version validée, cascade de réouverture, complétude du raffinage avant
validation d'une version de projet, calcul récursif de
is_implemented). 40 tests, pylint 10/10, bandit 0 issue, autopep8
clean.
Pas encore fait : CI (.forgejo/workflows/), Dockerfile,
deploy/, packaging SPA (requirements-spa.txt), blueprint Authentik
sur vps-garion, premier déploiement réel.