mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Don't show hidden tables on index page, closes #455
Refs #460. Also bulked out HTML index page unit tests.
This commit is contained in:
parent
24bf79d2f0
commit
e04511410f
3 changed files with 68 additions and 6 deletions
|
|
@ -52,7 +52,9 @@ class IndexView(RenderMixin):
|
|||
else hashlib.md5(name.encode("utf8")).hexdigest()[:6],
|
||||
"path": self.database_url(name),
|
||||
"tables_truncated": sorted(
|
||||
tables.values(), key=lambda t: t["count"] or 0, reverse=True
|
||||
(t for t in tables.values() if t not in hidden_tables),
|
||||
key=lambda t: t["count"] or 0,
|
||||
reverse=True,
|
||||
)[:5],
|
||||
"tables_count": len(tables),
|
||||
"tables_more": len(tables) > 5,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue