render_cell(value) plugin hook, closes #352

New plugin hook for customizing the way cells values are rendered in HTML.

The first full example of this hook in use is https://github.com/simonw/datasette-json-html
This commit is contained in:
Simon Willison 2018-08-04 17:14:56 -07:00 committed by GitHub
commit 4ac9132240
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 150 additions and 30 deletions

View file

@ -231,7 +231,7 @@ def test_database_page(app_client):
],
},
}, {
'columns': ['group', 'having', 'and'],
'columns': ['group', 'having', 'and', 'json'],
'name': 'select',
'count': 1,
'hidden': False,
@ -599,6 +599,7 @@ def test_table_with_reserved_word_name(app_client):
'group': 'group',
'having': 'having',
'and': 'and',
'json': '{"href": "http://example.com/", "label":"Example"}'
}]