New datasette.urls URL builders, refs #904

This commit is contained in:
Simon Willison 2020-10-19 17:33:59 -07:00
commit 310c3a3e05
11 changed files with 64 additions and 44 deletions

View file

@ -112,7 +112,7 @@ class IndexView(BaseView):
"color": db.hash[:6]
if db.hash
else hashlib.md5(name.encode("utf8")).hexdigest()[:6],
"path": self.database_url(name),
"path": self.ds.urls.database(name),
"tables_and_views_truncated": tables_and_views_truncated,
"tables_and_views_more": (len(visible_tables) + len(views))
> TRUNCATE_AT,