mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Expose current SQLite row to render_cell hook, closes #1300
This commit is contained in:
parent
9f1eb0d4ea
commit
6373bb3414
6 changed files with 14 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue