Commit graph

477 commits

Author SHA1 Message Date
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
Tobias Kunze
cd1b22f100 Button to format SQL, closes #136
SQL code will be formatted on page load, and can additionally
be formatted by clicking the "Format SQL" button.

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
7c247be4c9 Added /-/threads debugging page 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
d4fd7bb77b Refactored connection logic to database.connect() 2019-11-10 19:15:14 -08:00
Min ho Kim
5945c0cdd4 Fix numerous typos (#561)
Thanks, @minho42!
2019-11-10 19:15:14 -08:00
Simon Willison
5a8c335e5e Fixed CodeMirror on database page, closes #560 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
Simon Willison
159995d11e Fixed breadcrumbs on custom query page 2019-11-10 19:15:13 -08:00
Simon Willison
d6ce7379bd Removed unused variable 2019-11-10 19:15:13 -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
Abdus
302c1df25d Add support for running datasette as a module (#556)
python -m datasette

Thanks, @abdusco
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
322872c050 Fix nav display on 500 page, closes #545 2019-11-10 19:15:13 -08:00
Simon Willison
744d046403 white-space: pre-wrap for table SQL, closes #505 2019-11-10 19:15:13 -08:00
Simon Willison
2a5c42f6db min-height on .hd
Now it should be the same size on the homepage as it is on pages with breadcrumbs
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
859c79f115 Refactor templates for better top nav customization, refs #540 2019-11-10 19:15:13 -08:00
Simon Willison
8abc813196 Better robustness in face of missing raw_path 2019-11-10 19:15:13 -08:00
Simon Willison
a81312c043 Black 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
dea9f94742 Switch to ~= dependencies, closes #532 (#536)
* Switch to ~= dependencies, closes #532
* Bump click and click-default-group
* imp. is deprecated, use types.ModuleType instead - thanks https://stackoverflow.com/a/32175781
* Upgrade to pytest 5
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
55637ef994 Rename _rows_and_columns.html to _table.html, refs #521 2019-11-10 19:15:13 -08:00
Simon Willison
7d3783fda1 Default to raw value, use Row.display(key) for display, refs #521 2019-11-10 19:15:13 -08:00
Simon Willison
454c4dc770 New experimental Row() for templates, 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
425b471738 Refactored view class hierarchy, refs #272
See https://github.com/simonw/datasette/issues/272#issuecomment-502393107
2019-11-10 19:15:13 -08:00
Simon Willison
9c58d048ec Fix pagination when sorted by expanded foreign key
Closes #489
2019-05-27 19:23:18 -07:00
Simon Willison
f069950a14 Removed obsolete __init__ method 2019-05-27 19:03:36 -07:00
Simon Willison
bd4dbc8519 Rename InterruptedError => QueryInterrupted, closes #490 2019-05-27 17:16:36 -07:00
Simon Willison
edb36629e7 Database.get_outbound_foreign_keys() refactor
Following this, the only module that ever makes calls to the low-level
execute_against_connection_in_thread() method is datasette/database.py
2019-05-27 11:41:44 -07:00
Simon Willison
20f98c3e20 Databse.primary_keys(table) / fts_table(table) refactor, closes #488
Also cleaned up some unused imports spotted by the linter.
2019-05-27 11:27:42 -07:00
Simon Willison
6569287d90 Refactored ConnectedDatabase to datasette/database.py
Closes #487
2019-05-26 22:07:43 -07:00
Simon Willison
026c84db30 Refactor Datasette methods to ConnectedDatabase
Refs #487
2019-05-26 21:56:43 -07:00
Simon Willison
182a3017c2 Sort keys to past tests in Python 3.5 2019-05-25 09:22:02 -07:00
Simon Willison
9bd39672de Better label detection, refs #485
This needs unit tests.
2019-05-25 09:14:57 -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
de4503a136 Fix ?col__date= for columns with spaces 2019-05-20 22:36:56 -07:00
Simon Willison
e513a80afb Use -i with datasette publish, closes #469 2019-05-19 15:53:34 -07:00
Simon Willison
f4eefdf193 Do not allow downloads of mutable databases - closes #474 2019-05-19 13:41:09 -07:00
Simon Willison
503fee891b Removed 'datasette skeleton', closes #476 2019-05-19 13:05:38 -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