mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Table views now show expanded foreign key references, if possible
If a table has foreign key columns, and those foreign key tables have label_columns, the TableView will now query those other tables for the corresponding values and display those values as links in the corresponding table cells. label_columns are currently detected by the inspect() function, which looks for any table that has just two columns - an ID column and one other - and sets the label_column to be that second non-ID column.
This commit is contained in:
parent
6a007f6322
commit
1b04662585
2 changed files with 128 additions and 56 deletions
|
|
@ -21,6 +21,13 @@ td {
|
|||
th {
|
||||
padding-right: 1em;
|
||||
}
|
||||
table a:link {
|
||||
text-decoration: none;
|
||||
color: #445ac8;
|
||||
}
|
||||
table a:visited {
|
||||
color: #8f54c4;
|
||||
}
|
||||
@media only screen and (max-width: 576px) {
|
||||
/* Force table to not be like tables anymore */
|
||||
table, thead, tbody, th, td, tr {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue