diff --git a/datasette/static/app.css b/datasette/static/app.css index 21faa7a7..98c4a47c 100644 --- a/datasette/static/app.css +++ b/datasette/static/app.css @@ -17,6 +17,9 @@ td { padding: 4px; vertical-align: top; } +td.col-link { + font-weight: bold; +} td em { font-style: normal; font-size: 0.8em; diff --git a/datasette/templates/_rows_and_columns.html b/datasette/templates/_rows_and_columns.html index 7e11b2e8..8aa2e657 100644 --- a/datasette/templates/_rows_and_columns.html +++ b/datasette/templates/_rows_and_columns.html @@ -20,7 +20,7 @@ {% for row in display_rows %} {% for cell in row %} - {{ cell.value }} + {{ cell.value }} {% endfor %} {% endfor %} diff --git a/tests/test_html.py b/tests/test_html.py index 239d5354..e13c8b4f 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -183,14 +183,14 @@ def test_table_html_simple_primary_key(app_client): assert ['nofollow'] == a['rel'] assert [ [ - '1', - 'hello' + '1', + 'hello' ], [ - '2', - 'world' + '2', + 'world' ], [ - '3', - '' + '3', + '' ] ] == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')] @@ -204,8 +204,8 @@ def test_row_html_simple_primary_key(app_client): ] == [th.string.strip() for th in table.select('thead th')] assert [ [ - '1', - 'hello' + '1', + 'hello' ] ] == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')] @@ -226,12 +226,12 @@ def test_table_html_no_primary_key(app_client): ] == [th.string.strip() for th in table.select('thead th')[2:]] expected = [ [ - '{}'.format(i, i), - '{}'.format(i), - '{}'.format(i), - 'a{}'.format(i), - 'b{}'.format(i), - 'c{}'.format(i), + '{}'.format(i, i), + '{}'.format(i), + '{}'.format(i), + 'a{}'.format(i), + 'b{}'.format(i), + 'c{}'.format(i), ] for i in range(1, 51) ] assert expected == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')] @@ -246,11 +246,11 @@ def test_row_html_no_primary_key(app_client): ] == [th.string.strip() for th in table.select('thead th')] expected = [ [ - '1', - '1', - 'a1', - 'b1', - 'c1', + '1', + '1', + 'a1', + 'b1', + 'c1', ] ] assert expected == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')] @@ -270,10 +270,10 @@ def test_table_html_compound_primary_key(app_client): )) expected = [ [ - 'a,b', - 'a', - 'b', - 'c', + 'a,b', + 'a', + 'b', + 'c', ] ] assert expected == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')] @@ -285,9 +285,9 @@ def test_table_html_foreign_key_links(app_client): table = Soup(response.body, 'html.parser').find('table') expected = [ [ - '1', - 'hello\xa01', - '1' + '1', + 'hello\xa01', + '1' ] ] assert expected == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')] @@ -302,9 +302,9 @@ def test_row_html_compound_primary_key(app_client): ] == [th.string.strip() for th in table.select('thead th')] expected = [ [ - 'a', - 'b', - 'c', + 'a', + 'b', + 'c', ] ] assert expected == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')] @@ -319,14 +319,14 @@ def test_view_html(app_client): ] == [th.string.strip() for th in table.select('thead th')] expected = [ [ - 'hello', - 'HELLO' + 'hello', + 'HELLO' ], [ - 'world', - 'WORLD' + 'world', + 'WORLD' ], [ - '', - '' + '', + '' ] ] assert expected == [[str(td) for td in tr.select('td')] for tr in table.select('tbody tr')]