First working -d based Datasette Library

Refs #417

First proof-of-concept for Datasette Library. Run like this:

    datasette -d ~/Library

Uses a new plugin hook - available_databases()

BUT... I don't think this is quite the way I want to go.
This commit is contained in:
Simon Willison 2019-07-26 13:18:19 +03:00
commit 947645d847
15 changed files with 201 additions and 18 deletions

View file

@ -28,6 +28,7 @@ def test_homepage(app_client_two_attached_databases):
assert [
{"href": "/extra_database", "text": "extra_database"},
{"href": "/fixtures", "text": "fixtures"},
{"href": "/special", "text": "special"},
] == [{"href": a["href"], "text": a.text.strip()} for a in soup.select("h2 a")]
# The first attached database should show count text and attached tables
h2 = soup.select("h2")[0]