mirror of
https://github.com/simonw/datasette.git
synced 2026-11-04 09:18:30 +01:00
path and full_path arguments for output renderers, closes #1179
Output renderer render() and can_render() callbacks can now accept path and full_path arguments - the path to the HTML version of the page without the .extension, with and without the query string. Also fixed path_with_format() so it replaces the extension the current request used instead of falling back to ?_format=, which Datasette no longer reads. This broke links generated by renderers such as datasette-export-notebook, and the URLs returned by ?_extra=renderers on .json pages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TzcVp1Cq5yCRW81GiN88JX
This commit is contained in:
parent
7deb302aea
commit
cf6357cf93
10 changed files with 180 additions and 7 deletions
|
|
@ -753,7 +753,7 @@ The available table extras are listed below.
|
|||
.. code-block:: json
|
||||
|
||||
{
|
||||
"json": "/fixtures/facetable.json?_extra=renderers&_format=json&_labels=on"
|
||||
"json": "/fixtures/facetable.json?_extra=renderers&_labels=on"
|
||||
}
|
||||
|
||||
``custom_table_templates``
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue