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
|
|
@ -60,7 +60,7 @@ def publish_subcommand(publish):
|
|||
|
||||
|
||||
@hookspec
|
||||
def render_cell(value, column, table, database, datasette):
|
||||
def render_cell(row, value, column, table, database, datasette):
|
||||
"""Customize rendering of HTML table cell values"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -375,6 +375,7 @@ class QueryView(DataView):
|
|||
# pylint: disable=no-member
|
||||
plugin_display_value = None
|
||||
for candidate in pm.hook.render_cell(
|
||||
row=row,
|
||||
value=value,
|
||||
column=column,
|
||||
table=None,
|
||||
|
|
|
|||
|
|
@ -895,6 +895,7 @@ async def display_columns_and_rows(
|
|||
# pylint: disable=no-member
|
||||
plugin_display_value = None
|
||||
for candidate in pm.hook.render_cell(
|
||||
row=row,
|
||||
value=value,
|
||||
column=column,
|
||||
table=table_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue