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

@ -98,12 +98,13 @@ def extra_body_script(
@hookimpl
def render_cell(value, column, table, database, datasette):
def render_cell(row, value, column, table, database, datasette):
async def inner():
# Render some debug output in cell with value RENDER_CELL_DEMO
if value == "RENDER_CELL_DEMO":
return json.dumps(
{
"row": dict(row),
"column": column,
"table": table,
"database": database,