kopia lustrzana https://github.com/simonw/datasette
Suppress rendering of binary data - thanks @russss (#442)
Binary columns (including spatialite geographies) get shown as ugly binary strings in the HTML by default. Nobody wants to see that mess. Show the size of the column in bytes instead. If you want to decode the binary data, you can use a plugin to do it.pull/447/head
rodzic
bade9daeb2
commit
d555baf508
|
@ -120,6 +120,8 @@ class RowTableShared(BaseView):
|
|||
)
|
||||
if plugin_display_value is not None:
|
||||
display_value = plugin_display_value
|
||||
elif isinstance(value, bytes):
|
||||
display_value = jinja2.Markup("<{} bytes>".format(len(value)))
|
||||
elif isinstance(value, dict):
|
||||
# It's an expanded foreign key - display link to other row
|
||||
label = value["label"]
|
||||
|
|
Ładowanie…
Reference in New Issue