Export a list as a document: applications, companies and listings, whole and as filtered, through a theme #341

Closed
opened 2026-10-01 07:02:07 +00:00 by tiagoagueda · 0 comments
Owner

Postulo cannot export a list. The templates plugin is asked to offer "templates for exporting list, either company lists, job applications lists, or other lists" (postulo/postulo-templates#5), and there is nothing for a template to set.

What exists today

  • Three tables are registered (src/postulo/core/tables.py): applications, companies and listings. Sort and filters live in the address, the columns and the page size on the profile; a page holds 25, 50 or 100 rows.
  • No route, button or template exports one. The only CSVs Postulo writes are the report's evidence list and the import template.
  • Printing a list is the browser's dialog over the page on screen: one page of rows, with the filter bar, the buttons and the pagination printed too. The one @media print block (assets/css/app.css) hides the masthead and the footer and nothing else.
  • ThemeKind is cv, portfolio, letter; no document kind exists for a list.

Proposal

  1. An export on each table: the whole list as filtered and sorted, not the page on screen, in the columns the person has chosen and in their order.
  2. A list kind for themes and a context of plain values: the list's name, its filters in words, the column labels, the rows as text already formatted in the document's language, the count, when it was made, and the language and direction.
  3. A PDF through the document renderer, drawn by the theme chosen (the per-person choice of #340), with plain and classic templates of Postulo's own.
  4. Large lists drawn in the background, as the report is, with a ceiling on rows that the page states.
  5. A CSV of the same rows, with the cells guarded as the report's are (spreadsheets.row, #218).

Decisions

  • One kind for every list, or one per list. Recommended: one, taking any list's columns and rows, so a table added later needs no new kind.
  • Downloaded or filed. Recommended: a download, not a filed document: #236 keeps exports made on their own out of the document stores.
  • Which lists. Recommended: the three tables first. Interviews have a list page and no table; contacts have no list page at all.
  • Columns. Recommended: the person's own, with a note of any the export leaves out (a column of buttons).

Security

Owner only: an export answers 404 for anybody else's list. A filter value arrives from the address and is validated by the table, as on the page.

Needed by

postulo/postulo-templates#5. Landscape for a wide list is #344.

Done when

  • Applications filtered and sorted on the page are exported whole, as a PDF and as a CSV, in the person's columns.
  • A plugin theme that sets the list kind is offered for the PDF.
  • New names on postulo.plugins.api get their line in the wiki's Writing a plugin (tests/test_wiki_surface.py) and a test in tests/test_plugin_surface.py; new pages join the page-coverage walk (tests/test_page_coverage.py) and the isolation sweep (tests/security/test_isolation_sweep.py); new strings go in the working catalogues (English, French, and European and Brazilian Portuguese as drafts).

From the list of template improvements of 2026-09-30.

Postulo cannot export a list. The templates plugin is asked to offer "templates for exporting list, either company lists, job applications lists, or other lists" (postulo/postulo-templates#5), and there is nothing for a template to set. ## What exists today - Three tables are registered (`src/postulo/core/tables.py`): applications, companies and listings. Sort and filters live in the address, the columns and the page size on the profile; a page holds 25, 50 or 100 rows. - No route, button or template exports one. The only CSVs Postulo writes are the report's evidence list and the import template. - Printing a list is the browser's dialog over the page on screen: one page of rows, with the filter bar, the buttons and the pagination printed too. The one `@media print` block (`assets/css/app.css`) hides the masthead and the footer and nothing else. - `ThemeKind` is `cv`, `portfolio`, `letter`; no document kind exists for a list. ## Proposal 1. **An export on each table**: the whole list as filtered and sorted, not the page on screen, in the columns the person has chosen and in their order. 2. **A list kind for themes** and a context of plain values: the list's name, its filters in words, the column labels, the rows as text already formatted in the document's language, the count, when it was made, and the language and direction. 3. **A PDF** through the document renderer, drawn by the theme chosen (the per-person choice of #340), with `plain` and `classic` templates of Postulo's own. 4. **Large lists** drawn in the background, as the report is, with a ceiling on rows that the page states. 5. **A CSV of the same rows**, with the cells guarded as the report's are (`spreadsheets.row`, #218). ## Decisions - **One kind for every list, or one per list.** Recommended: one, taking any list's columns and rows, so a table added later needs no new kind. - **Downloaded or filed.** Recommended: a download, not a filed document: #236 keeps exports made on their own out of the document stores. - **Which lists.** Recommended: the three tables first. Interviews have a list page and no table; contacts have no list page at all. - **Columns.** Recommended: the person's own, with a note of any the export leaves out (a column of buttons). ## Security Owner only: an export answers 404 for anybody else's list. A filter value arrives from the address and is validated by the table, as on the page. ## Needed by postulo/postulo-templates#5. Landscape for a wide list is #344. ## Done when - Applications filtered and sorted on the page are exported whole, as a PDF and as a CSV, in the person's columns. - A plugin theme that sets the list kind is offered for the PDF. - New names on `postulo.plugins.api` get their line in the wiki's *Writing a plugin* (`tests/test_wiki_surface.py`) and a test in `tests/test_plugin_surface.py`; new pages join the page-coverage walk (`tests/test_page_coverage.py`) and the isolation sweep (`tests/security/test_isolation_sweep.py`); new strings go in the working catalogues (English, French, and European and Brazilian Portuguese as drafts). From the list of template improvements of 2026-09-30.
tiagoagueda added this to the 0.5.0 milestone 2026-10-25 17:04:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#341
No description provided.