mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
render_cell(..., request) argument, closes #2007
This commit is contained in:
parent
e4ebef082d
commit
0b4a286914
7 changed files with 30 additions and 18 deletions
|
|
@ -380,8 +380,8 @@ Examples: `datasette-publish-fly <https://datasette.io/plugins/datasette-publish
|
|||
|
||||
.. _plugin_hook_render_cell:
|
||||
|
||||
render_cell(row, value, column, table, database, datasette)
|
||||
-----------------------------------------------------------
|
||||
render_cell(row, value, column, table, database, datasette, request)
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Lets you customize the display of values within table cells in the HTML table view.
|
||||
|
||||
|
|
@ -403,6 +403,9 @@ Lets you customize the display of values within table cells in the HTML table vi
|
|||
``datasette`` - :ref:`internals_datasette`
|
||||
You can use this to access plugin configuration options via ``datasette.plugin_config(your_plugin_name)``, or to execute SQL queries.
|
||||
|
||||
``request`` - :ref:`internals_request`
|
||||
The current request object
|
||||
|
||||
If your hook returns ``None``, it will be ignored. Use this to indicate that your hook is not able to custom render this particular value.
|
||||
|
||||
If the hook returns a string, that string will be rendered in the table cell.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue