Expose current SQLite row to render_cell hook, closes #1300

This commit is contained in:
Simon Willison 2022-07-07 09:30:49 -07:00
commit 6373bb3414
6 changed files with 14 additions and 7 deletions

View file

@ -373,12 +373,15 @@ Examples: `datasette-publish-fly <https://datasette.io/plugins/datasette-publish
.. _plugin_hook_render_cell:
render_cell(value, column, table, database, datasette)
------------------------------------------------------
render_cell(row, value, column, table, database, datasette)
-----------------------------------------------------------
Lets you customize the display of values within table cells in the HTML table view.
``value`` - string, integer or None
``row`` - ``sqlite.Row``
The SQLite row object that the value being rendered is part of
``value`` - string, integer, float, bytes or None
The value that was loaded from the database
``column`` - string