Skip to content

path and full_path arguments for output renderers, closes #1179 - #2987

Merged
simonw merged 2 commits into
mainfrom
claude/issue-1179-render-path
Nov 14, 2026
Merged

simonw merged 2 commits into
mainfrom
claude/issue-1179-render-path

Conversation

@simonw

@simonw simonw commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

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

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
@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (8381d87) to head (8ea55c3).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
datasette/utils/__init__.py 0.00% 11 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2987   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         79      79           
  Lines      13929   13938    +9     
=====================================
- Misses     13929   13938    +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

# Conflicts:
#	datasette/views/database.py
#	datasette/views/table.py
#	datasette/views/table_extras.py
@simonw simonw added this to the Datasette 1.0 stable milestone Nov 14, 2026
@simonw
simonw merged commit 3daa2e0 into main Nov 14, 2026
15 checks passed
@simonw
simonw deleted the claude/issue-1179-render-path branch November 14, 2026 23:39
simonw pushed a commit that referenced this pull request Nov 15, 2026
The path and full_path render arguments from #2987 are now passed by
render_with_output_renderer(), replacing the three call sites that
conflicted.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016BvfqCn4No2Nib8F28Zt5J
simonw added a commit that referenced this pull request Nov 15, 2026
Refs #749, #862, #954, #1062, #1101, #1179, #1410, #2137, #2186, #2317, #2612, #2663, #2770, #2969, #2980, #2987, #3035, #3036, #3053, #3054, #3055, #3056, #3057, #3060, #3061, #3063, #3064, #3067

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants