Commit graph

274 commits

Author SHA1 Message Date
Simon Willison
d3e9387466 pk__notin= filter, closes #614 2019-11-10 19:15:14 -08:00
Simon Willison
5eaf398592 Fix CSV export for nullable foreign keys, closes #612 2019-11-10 19:15:14 -08:00
Simon Willison
28ac836b58 Don't show 'None' as label for nullable foreign key, closes #406 2019-11-10 19:15:14 -08:00
Simon Willison
18ba0c27b5 Don't suggest array facet if column is only [], closes #610 2019-11-10 19:15:14 -08:00
Simon Willison
0dde00e7bb Only suggest array facet for arrays of strings - closes #562 2019-11-10 19:15:14 -08:00
Simon Willison
76eb6047d4 Persist _where= in hidden fields, closes #604 2019-11-10 19:15:14 -08:00
Simon Willison
48054b358a Update to latest black (#609) 2019-11-10 19:15:14 -08:00
chris48s
ca44cc03e3 Always pop as_format off args dict (#603)
Closes #563. Thanks, @chris48s
2019-11-10 19:15:14 -08:00
Simon Willison
c387b47ec6 Fix for /foo v.s. /foo-bar issue, closes #597
Pull request #599
2019-11-10 19:15:14 -08:00
Simon Willison
a9f877f7bf Fixed bug returning non-ascii characters in CSV, closes #584 2019-11-10 19:15:14 -08:00
Simon Willison
e5308c1ec2 Use --platform=managed for publish cloudrun, closes #587 2019-11-10 19:15:14 -08:00
Tobias Kunze
2bd116234b Display metadata footer on custom SQL queries (#589)
Closes #408 - thanks, @rixx!
2019-11-10 19:15:14 -08:00
Tobias Kunze
2ad1f0d34e Sort databases on homepage by argument order - #591
Closes #585 - thanks, @rixx!
2019-11-10 19:15:14 -08:00
Simon Willison
e2eff14cf9 Allow EXPLAIN WITH... - closes #583 2019-11-10 19:15:14 -08:00
Simon Willison
5a43d8e3d1 detect_fts now works with alternative table escaping (#571)
Fixes #570. See also https://github.com/simonw/sqlite-utils/pull/57
2019-11-10 19:15:14 -08:00
Simon Willison
86316eef04 Fix plus test for unicode characters in custom query name, closes #558 2019-11-10 19:15:14 -08:00
Abdus
82889507ca Fix static mounts using relative paths and prevent traversal exploits (#554)
Thanks, @abdusco! Closes #555
2019-11-10 19:15:13 -08:00
Simon Willison
473c53bf2c --plugin-secret option for datasette publish
Closes #543

Also added new --show-files option to publish now and publish cloudrun - handy for debugging.
2019-11-10 19:15:13 -08:00
Simon Willison
04e7fb6c9a Removed ManyToManyFacet for the moment, closes #550 2019-11-10 19:15:13 -08:00
Simon Willison
42d6877784 extra_template_vars plugin hook (#542)
* extra_template_vars plugin hook

Closes #541

* Workaround for cwd bug

Based on https://github.com/pytest-dev/pytest/issues/1235#issuecomment-175295691
2019-11-10 19:15:13 -08:00
Simon Willison
ac0a18dbb2 Fix for accidentally leaking secrets in /-/metadata, closes #538 2019-11-10 19:15:13 -08:00
Simon Willison
ec758527b6 Secret plugin configuration options (#539)
Closes #538
2019-11-10 19:15:13 -08:00
Simon Willison
a253173008 Added asgi_wrapper plugin hook, closes #520 2019-11-10 19:15:13 -08:00
Simon Willison
986919aa03 Unit test for _table custom template, refs #521 2019-11-10 19:15:13 -08:00
Simon Willison
51c39ac398 Port Datasette from Sanic to ASGI + Uvicorn (#518)
Datasette now uses ASGI internally, and no longer depends on Sanic.

It now uses Uvicorn as the underlying HTTP server.

This was thirteen months in the making... for full details see the issue:

https://github.com/simonw/datasette/issues/272

And for a full sequence of commits plus commentary, see the pull request:

https://github.com/simonw/datasette/pull/518
2019-11-10 19:15:13 -08:00
Simon Willison
3cf5830bc6 Revert "New encode/decode_path_component functions"
Refs #272

This reverts commit 9fdb47ca95.

Now that ASGI supports raw_path we don't need our own encoding scheme!
2019-11-10 19:15:13 -08:00
Simon Willison
2a4b892d6c Tidy up with Black 2019-05-27 19:28:47 -07:00
Simon Willison
9c58d048ec Fix pagination when sorted by expanded foreign key
Closes #489
2019-05-27 19:23:18 -07:00
Simon Willison
de92c05134 Fixed duplicate function name 2019-05-27 18:49:57 -07:00
Simon Willison
839e55bf0a Start of unit tests for Database class, refs #485 2019-05-27 18:42:30 -07:00
Simon Willison
182a3017c2 Sort keys to past tests in Python 3.5 2019-05-25 09:22:02 -07:00
Simon Willison
d923d84754 Facet by many-to-many, closes #365 2019-05-25 09:06:32 -07:00
Simon Willison
172da009d8 Added ?_through= table argument, closes #355
Also added much more interesting many-to-many fixtures - roadside attractions!
2019-05-22 22:45:12 -07:00
Simon Willison
967230c90e Facet by date, closes #481 2019-05-20 23:09:22 -07:00
Simon Willison
2d14f21f85 Updated tests for date(...) lookup 2019-05-20 23:06:19 -07:00
Simon Willison
f4eefdf193 Do not allow downloads of mutable databases - closes #474 2019-05-19 13:41:09 -07:00
Simon Willison
7d8573d672 Rename "datasette publish now" to "datasette publish nowv1"
Also added an alias so "datasette publish now" continues to work.

Closes #472
2019-05-19 11:06:51 -07:00
Simon Willison
db9dbfb816 ?_hash=1 no longer respected for mutable databases
Closes #471, refs #419
2019-05-16 08:10:25 -07:00
Simon Willison
0dad111d24 New introspection endpoint: /-/databases - closes #470
Refs #419 and #465
2019-05-16 07:49:34 -07:00
Simon Willison
21b57cdf9a serve --inspect-file=X now populates cached table counts
Closes #462
2019-05-16 07:30:32 -07:00
Simon Willison
909e66dfdb Removed .inspect() and /-/inspect.json
Refs #462

/-/inspect.json may return in some shape in #465
2019-05-16 07:15:24 -07:00
Simon Willison
faf33515b2 Sometimes sort tables by number of relationships, closes #460 2019-05-15 20:23:33 -07:00
Simon Willison
689cf9c139 Index page only shows row counts for smaller databases
The index page now only shows row counts for immutable databases OR for
databases with less than 30 tables provided it could get a count for
each of those tables in less than 10ms.

Closes #467, Refs #460
2019-05-15 20:02:33 -07:00
Simon Willison
79303163b2 Row count fix + sort index page databases alphabetically
Sorting alphabetically should fix a test failure in Python 3.5

Refs #460
2019-05-15 17:40:10 -07:00
Simon Willison
5d6b2c30f1 Include views on homepage, fix table counts
If we have less than 5 tables we now also show one or more views in the
summary on the homepage.

Also corrected the logic for the row counts - we now count hidden and
visible tables separately.

Closes #373, Refs #460
2019-05-15 17:28:07 -07:00
Simon Willison
e04511410f Don't show hidden tables on index page, closes #455
Refs #460. Also bulked out HTML index page unit tests.
2019-05-14 08:46:57 -07:00
Simon Willison
24bf79d2f0 Run sanity checks, not .inspect(), on startup
Also fixes tests that did NOT like a call to run_until_complete in the Datasette() constructor.
2019-05-11 16:22:55 -07:00
Simon Willison
da0b3ce2b7 New run_sanity_checks mechanism, for SpatiLite
Moved VirtualSpatialIndex check into a new mechanism that should allow
us to add further sanity checks in the future.

To test this I've had to commit a binary sample SpatiaLite database to
the repository. I included a build script for creating that database.

Closes #466
2019-05-11 15:55:30 -07:00
Simon Willison
c692cd2911 Fix test ordering 2019-05-11 15:03:52 -07:00
Simon Willison
a187c81e0c Black + fix broken test 2019-05-11 14:45:59 -07:00