Wykres commitów

1219 Commity (permissions-allow-blocks)

Autor SHA1 Wiadomość Data
Simon Willison 14e320329f Hidden tables data_licenses, KNN, KNN2 for SpatiaLite, closes #1601 2022-01-19 20:38:49 -08:00
Simon Willison 58652dd925 Hidden tables sqlite1/2/3/4, closes #1587 2022-01-19 20:12:46 -08:00
Simon Willison cb29119db9 Release 0.60
Refs #473, #625, #1527, #1544, #1547, #1551, #1552, #1555, #1556, #1557,
#1563, #1564, #1568, #1570, #1575, #1579, #1588, #1594
2022-01-13 17:36:51 -08:00
Simon Willison ab7d6a7179 Updated settings help URL to avoid redirect 2022-01-13 16:38:16 -08:00
Simon Willison 3a0f7d6488 Fixed hidden form fields bug #1527 2022-01-13 16:27:21 -08:00
Simon Willison 515f8d38eb Help summaries for publish cloudrun/heroku 2022-01-13 16:12:54 -08:00
Simon Willison 8cf4b77a92 Better copy for 'datasette plugins --help' 2022-01-13 16:11:07 -08:00
Simon Willison 8f5c44a166 Better --help summaries for install and uninstall 2022-01-13 16:09:38 -08:00
Simon Willison 88bc2ceae1 --help summary for 'datasette inspect', closes #1597 2022-01-13 16:07:30 -08:00
Simon Willison 3658e57ac2 Fixed bug with table title element, closes #1560 2022-01-13 14:20:07 -08:00
Simon Willison 63537dd3de Allow 'explain query plan' with more whitespace, closes #1588 2022-01-13 12:34:55 -08:00
Simon Willison 8c401ee0f0 Fixed remaining code and docs for new block=True default, closes #1579 2021-12-23 11:18:20 -08:00
Simon Willison 00a2895cd2 execute_write defaut is now block=True, closes #1579 2021-12-23 11:03:49 -08:00
Simon Willison ace86566b2 Remove concept of special_args, re-arrange TableView a bit, refs #1518 2021-12-22 12:23:05 -08:00
Simon Willison dbaac79946 Release 0.60a1
Refs #1547, #1555, #1562, #1563, #1564, #1567, #1568, #1569, #1570, #1571, #1572
2021-12-19 14:08:10 -08:00
Simon Willison 4094741c28 Fixed bug with custom templates for writable canned queries, closes #1547 2021-12-19 13:11:57 -08:00
Simon Willison 5fac26aa22 Another populate_schema_tables optimization, refs #1555 2021-12-19 12:54:12 -08:00
Simon Willison f65817000f Include count in execute_write_many traces, closes #1571 2021-12-19 12:30:34 -08:00
Simon Willison c6ff1f23e6 Queries took rather than query took, closes #1572 2021-12-18 20:03:21 -08:00
Simon Willison 97b1723dd0 Optimize init_internal_db by running PRAGMA in a single function
Refs #1555
2021-12-18 19:49:11 -08:00
Simon Willison d637ed4676 Use execute_write_many to optimize internal DB, refs #1555, #1570 2021-12-18 11:11:08 -08:00
Simon Willison 5cadc24489 db.execute_write_script() and db.execute_write_many(), closes #1570
Refs #1555
2021-12-18 10:57:22 -08:00
Simon Willison 2e4ba71b53 Optimize create table calls using executescript=True
Refs #1555, #1569
2021-12-18 10:34:15 -08:00
Simon Willison 9e094b7c9d db.execute_write(executescript=True) option, closes #1569 2021-12-18 10:34:15 -08:00
Simon Willison f81d9d0cd9 Trace write SQL queries in addition to read ones, closes #1568 2021-12-17 18:42:29 -08:00
Simon Willison 359140ceda Datasette() constructor no longer requires files=, closes #1563 2021-12-17 18:09:00 -08:00
Simon Willison 83bacfa945 Call _prepare_connection() on write connections, closes #1564 2021-12-17 17:58:39 -08:00
Simon Willison c35b84a2aa Remove undocumented sqlite_functions mechanism, closes #1567 2021-12-17 17:54:39 -08:00
Simon Willison d0f24f9bbc Clarifying comment
The new filters stuff is a little bit action-at-a-distance
2021-12-17 15:55:06 -08:00
Simon Willison f000a7bd75
Use load_extension(?) instead of fstring 2021-12-17 12:15:29 -08:00
Simon Willison 92a5280d2e Release 0.60a0
Refs #473, #625, #1544, #1551, #1552, #1556, #1557
2021-12-17 11:13:51 -08:00
Simon Willison aa7f0037a4
filters_from_request plugin hook, now used in TableView
- New `filters_from_request` plugin hook, closes #473
- Used it to extract the logic from TableView that handles `_search` and
`_through` and `_where` - refs #1518

Also needed for this plugin work: https://github.com/simonw/datasette-leaflet-freedraw/issues/7
2021-12-17 11:02:14 -08:00
Simon Willison 0663d5525c More comments in TableView.data(), refs #1518 2021-12-16 14:00:29 -08:00
Simon Willison 2c07327d23 Move columns_to_select to TableView class, add lots of comments, refs #1518 2021-12-16 13:43:44 -08:00
Simon Willison 95d0dd7a1c Fix for colliding facet types bug, closes #625
Refs #830
2021-12-16 12:12:04 -08:00
Simon Willison 992496f261 ?_nosuggest=1 parameter for table views, closes #1557 2021-12-16 11:24:54 -08:00
Simon Willison 20a2ed6bec Fixed bug with metadata config of array/date facets, closes #1552
Thanks @davidbgk for spotting the fix for the bug.
2021-12-16 10:47:40 -08:00
Simon Willison eb53837d2a Always show count of distinct facet values, closes #1556
Refs #1423
2021-12-15 09:58:01 -08:00
Simon Willison a6ff123de5 keep_blank_values=True when parsing query_string, closes #1551
Refs #1518
2021-12-12 12:01:51 -08:00
Simon Willison 737115ea14
Label column finder is now case-insensitive
Closes #1544
2021-12-07 12:03:42 -08:00
Simon Willison 7c02be2ee9 Release 0.59.4
Refs #1525, #1527
2021-11-29 22:45:37 -08:00
Simon Willison a37ee74891 Correct link to _ prefix on row page, closes #1525 2021-11-29 22:34:31 -08:00
Simon Willison 06762776f7 Fix for incorrect hidden for fields for _columns, refs #1527 2021-11-29 19:04:35 -08:00
Simon Willison 48f11998b7 Release 0.59.3
Refs #448, #838, #1519
2021-11-20 15:40:21 -08:00
Simon Willison 250db8192c Hopefully last fix relating to #1519, #838 2021-11-20 11:09:05 -08:00
Simon Willison 08947fa764 Fix more broken base_url links
Refs #1519, #838
2021-11-20 11:03:08 -08:00
Simon Willison 640031edfd Fixed bug introduced in #1519 2021-11-19 17:01:17 -08:00
Simon Willison fe687fd020 Fixed a whole bunch of broken base_url links
Refs #1519, #838
2021-11-19 16:53:11 -08:00
Simon Willison ff0dd4da38 repr() method for Request, refs #1519 2021-11-19 12:29:37 -08:00
Simon Willison 3025505515 functools.wraps to help investigate #1517 2021-11-18 19:19:43 -08:00
Simon Willison 0156c6b5e5 Facet in predictable order for tests, refs #448 2021-11-15 17:31:33 -08:00
Simon Willison 55024b5301 _facet_array no longer confused by duplicate array items, closes #448 2021-11-15 17:19:33 -08:00
Simon Willison 07044bd130 SQL view-friendly arraycontains/arraynotcontains implementation, refs #448 2021-11-15 15:41:07 -08:00
Simon Willison de1e031713 Release 0.59.2
Refs #1497, #1503, #1506
2021-11-13 21:14:43 -08:00
Simon Willison 1c13e1af06 Ensure query columns are included too, ref #1503 2021-11-13 21:08:33 -08:00
Simon Willison c9e3cfecc8 Columns in filters now ignore ?_nocol, closes #1503 2021-11-13 20:53:00 -08:00
Simon Willison c306b696de Correct facet links for columns with a leading underscore, closes #1506 2021-11-13 20:44:54 -08:00
Simon Willison e6e44372b3 Release 0.59.1
Refs #1482, #1496
2021-10-24 15:29:56 -07:00
Simon Willison 8934507cdc Release 0.59
Refs #942, #1404, #1405, #1416, #1420, #1421, #1422, #1423, #1425, #1431, #1443, #1446, #1449, #1467, #1469, #1470, #1488
2021-10-14 12:22:19 -07:00
Simon Willison 8584993529 --cors Access-Control-Allow-Headers: Authorization
Refs #1467, refs https://github.com/simonw/datasette-auth-tokens/issues/4
2021-10-14 12:03:28 -07:00
Simon Willison b267b57754
Upgrade to httpx 0.20
* Upgrade to httpx 0.20, closes #1488
* TestClient.post() should not default to following redirects
2021-10-14 11:03:44 -07:00
Simon Willison 763d0a0faa Fix for cog menu default facet bug, closes #1469 2021-10-13 14:20:03 -07:00
Simon Willison b50bf5d13f Don't persist _next in hidden field, closes #1483 2021-10-13 14:08:06 -07:00
Simon Willison 0d5cc20aef Revert "asyncio_run helper to deal with a 3.10 warning, refs #1482"
This reverts commit 98dcabccbb.
2021-10-09 18:25:33 -07:00
Simon Willison 875117c343 Fix bug with ?_next=x&_sort=rowid, closes #1470 2021-10-09 18:14:56 -07:00
Simon Willison 98dcabccbb asyncio_run helper to deal with a 3.10 warning, refs #1482 2021-10-08 17:32:11 -07:00
Simon Willison d3ea367131 Release 0.59a2
Refs #942, #1421, #1423, #1431, #1443, #1446, #1449
2021-08-27 18:55:54 -07:00
Simon Willison 30c18576d6 register_commands() plugin hook, closes #1449 2021-08-27 18:39:42 -07:00
Simon Willison 3655bb49a4 Better default help text, closes #1450 2021-08-27 17:49:03 -07:00
Simon Willison 92a99d969c Added not-footer wrapper div, refs #1446 2021-08-24 11:13:42 -07:00
Simon Willison adb5b70de5 Show count of facet values if ?_facet_size=max, closes #1423 2021-08-16 11:56:32 -07:00
Simon Willison 2883098770 Fixed config_dir mode, refs #1432 2021-08-12 22:17:40 -07:00
Simon Willison bbc4756f9e
Settings fix, refs #1433 2021-08-12 20:54:25 -07:00
Simon Willison ca4f83dc7b Rename config= to settings=, refs #1432 2021-08-12 18:10:36 -07:00
Simon Willison 77f46297a8 Rename --help-config to --help-settings, closes #1431 2021-08-12 18:01:57 -07:00
Simon Willison e837095ef3
Column metadata, closes #942 2021-08-12 16:53:23 -07:00
Simon Willison b1fed48a95 derive_named_parameters falls back to regex on SQL error, refs #1421 2021-08-08 20:26:08 -07:00
Simon Willison fc4846850f New way of deriving named parameters using explain, refs #1421 2021-08-08 20:21:13 -07:00
Simon Willison ad90a72afa Release 0.59a1
Refs #1425
2021-08-08 18:13:03 -07:00
Simon Willison a390bdf9ce Stop using firstresult=True on render_cell, refs #1425
See https://github.com/simonw/datasette/issues/1425#issuecomment-894883664
2021-08-08 17:38:42 -07:00
Simon Willison 3bb6409a6c render_cell() can now return an awaitable, refs 2021-08-08 16:05:00 -07:00
Simon Willison 61505dd0c6 Release 0.59a0
Refs #1404, #1405, #1416, #1420, #1422
2021-08-06 22:40:07 -07:00
Simon Willison a21853c9da Fix for rich.console sometimes not being available, refs #1416 2021-08-06 22:17:36 -07:00
Simon Willison 66e143c76e New hide_sql canned query option, refs #1422 2021-08-06 22:17:36 -07:00
Simon Willison b7037f5ece Bit of breathing space on https://latest.datasette.io/fixtures/pragma_cache_size 2021-08-06 22:17:36 -07:00
Simon Willison a1f3830356 --cpu option for datasette publish cloudrun, closes #1420 2021-08-03 22:20:50 -07:00
Simon Willison cd8b7bee8f Run codespell against datasette source code too, refs #1417 2021-08-03 10:03:48 -07:00
Simon Willison 54b6e96ee8 Use optional rich dependency to render tracebacks, closes #1416 2021-08-03 09:12:48 -07:00
Simon Willison 4adca0d850 No hidden SQL on canned query pages, closes #1411 2021-07-31 17:58:11 -07:00
Simon Willison eccfeb0871 register_routes() plugin hook datasette argument, closes #1404 2021-07-26 16:16:46 -07:00
Simon Willison c73af5dd72 Release 0.58.1
Refs #1231, #1396
2021-07-16 12:50:06 -07:00
Simon Willison c00f29affc
Fix for race condition in refresh_schemas(), closes #1231 2021-07-16 12:44:58 -07:00
Simon Willison dd5ee8e668 Removed some unused imports
I found these with:

    flake8 datasette | grep unus
2021-07-15 23:26:12 -07:00
Simon Willison e27dd7c12c Release 0.58
Refs #1365, #1371, #1377, #1384, #1387, #1388, #1389, #1394
2021-07-14 17:33:04 -07:00
Simon Willison a6c8e7fa4c Big performance boost for faceting, closes #1394 2021-07-14 17:05:43 -07:00
Simon Willison 180c7a5328 --uds option for binding to Unix domain socket, closes #1388 2021-07-10 16:37:30 -07:00
Simon Willison 83f6799a96 searchmode: raw table metadata property, closes #1389 2021-07-10 11:33:08 -07:00
Simon Willison ea627baccf Removed fallback parameter from get_metadata, refs #1384 2021-06-26 17:02:42 -07:00
Brandon Roberts baf986c871
New get_metadata() plugin hook for dynamic metadata
The following hook is added:

    get_metadata(
      datasette=self, key=key, database=database, table=table,
      fallback=fallback
    )

This gets called when we're building our metdata for the rest
of the system to use. We merge whatever the plugins return
with any local metadata (from metadata.yml/yaml/json) allowing
for a live-editable dynamic Datasette.

As a security precation, local meta is *not* overwritable by
plugin hooks. The workflow for transitioning to live-meta would
be to load the plugin with the full metadata.yaml and save.
Then remove the parts of the metadata that you want to be able
to change from the file.

* Avoid race condition: don't mutate databases list

This avoids the nasty "RuntimeError: OrderedDict mutated during
iteration" error that randomly happens when a plugin adds a
new database to Datasette, using `add_database`. This change
makes the add and remove database functions more expensive, but
it prevents the random explosion race conditions that make for
confusing user experience when importing live databases.

Thanks, @brandonrobertz
2021-06-26 15:24:54 -07:00
Simon Willison ff17970ed4 Release 0.58a1
Refs #1365, #1377
2021-06-24 09:24:59 -07:00
Simon Willison b1fd24ac9f skip_csrf(datasette, scope) plugin hook, refs #1377 2021-06-23 15:40:09 -07:00
Simon Willison 4a3e8561ab Default 405 for POST, plus tests 2021-06-23 15:40:09 -07:00
Chris Amico a6c55afe8c
Ensure db.path is a string before trying to insert into internal database (#1370)
Thanks, @eyeseast
2021-06-21 08:57:38 -07:00
Simon Willison cd7678fde6 Release 0.58a0
Refs #1371
2021-06-09 21:51:14 -07:00
Simon Willison d23a267138 Make request available to menu plugin hooks, closes #1371 2021-06-09 21:45:24 -07:00
Simon Willison a3faf37883 Release 0.57.1
Refs #1364, #1367
2021-06-08 09:26:45 -07:00
Simon Willison f4c5777c7e Fix visual glitch in nav menu, closes #1367 2021-06-07 11:24:14 -07:00
Simon Willison 03ec71193b Don't truncate list of columns on /db page, closes #1364 2021-06-06 15:07:45 -07:00
Simon Willison 58746d3c51 Release 0.57
Refs #263, #615, #619, #1238, #1257, #1305, #1308, #1320, #1332, #1337, #1349, #1353, #1359, #1360
2021-06-05 15:06:55 -07:00
Simon Willison 8f311d6c1d Correctly escape output of ?_trace, refs #1360 2021-06-05 15:03:38 -07:00
Simon Willison ff29dd55fa ?_trace=1 now depends on trace_debug setting, closes #1359 2021-06-05 13:18:37 -07:00
Simon Willison a634121525
Make custom pages compatible with base_url setting
Closes #1238

- base_url no longer causes custom page routing to fail
- new route_path key in request.scope storing the path that was used for routing with the base_url prefix stripped
- TestClient used by tests now avoids accidentally double processing of the base_url prefix
2021-06-05 11:59:54 -07:00
Simon Willison 6e9b07be92 More inclusive language 2021-06-02 21:45:03 -07:00
Guy Freeman 0f41db1ba8
Avoid error sorting by relationships if related tables are not allowed
Refs #1306
2021-06-01 21:25:27 -07:00
Simon Willison f40d1b99d6 Don't show '0 results' on error page, refs #619 2021-06-01 21:09:10 -07:00
Simon Willison ea5b237800 Show error message on bad query, closes #619 2021-06-01 20:59:29 -07:00
Simon Willison 9552414e1f
Re-display user's query with an error message if an error occurs (#1346)
* Ignore _shape when returning errors
2021-06-01 20:46:20 -07:00
Simon Willison 0f1e47287c Fixed bug with detect_fts for table with single quote in name, closes #1257 2021-06-01 20:27:04 -07:00
Simon Willison 807de378d0 /-/databases and homepage maintain connection order, closes #1216 2021-06-01 20:10:15 -07:00
Simon Willison 0539bf0816 Don't execute facets/counts for _shape=array or object, closes #263 2021-06-01 19:53:00 -07:00
Simon Willison a18e8641bc Don't reflect nofacet=1 and nocount=1 in BLOB URLs, refs #1353 2021-06-01 15:35:33 -07:00
Simon Willison fd368d3b2c New _nocount=1 option, used to speed up CSVs - closes #1353 2021-06-01 09:12:32 -07:00
Simon Willison 8bde6c5461 Rename ?_nofacets=1 to ?_nofacet=1, refs #1353 2021-06-01 08:56:00 -07:00
Simon Willison d1d06ace49 ?_trac=1 for CSV, plus ?_nofacets=1 when rendering CSV
Closes #1351, closes #1350
2021-06-01 08:49:50 -07:00
Simon Willison c5ae1197a2 ?_nofacets=1 option, closes #1350 2021-05-30 22:39:14 -04:00
Simon Willison f7d3e76fb3 Facets now execute ignoring ?_col and ?_nocol, fixes #1345 2021-05-30 22:31:14 -04:00
Simon Willison 7b106e1060 Release 0.57a1
Refs #1319, #1320, #1331, #1337, #1338, #1341
2021-05-27 09:54:21 -07:00
Simon Willison 1a8972f9c0
Upgrade Heroku runtime to python-3.8.10 2021-05-27 09:11:03 -07:00
Simon Willison 7e983fede6 ?_facet_size=max, ... now links to that, closes #1337
Refs #1332
2021-05-27 09:00:58 -07:00
Simon Willison 51d7881140 'Show all columns' menu item if any _col= set, closes #1341
Refs #615
2021-05-26 21:31:12 -07:00
Simon Willison f1c29fd6a1
?_col=/?_nocol= to show/hide columns on the table page
Closes #615

* Cog icon for hiding columns
* Show all columns cog menu item
* Do not allow hide column on primary keys
* Allow both ?_col= and ?_nocol=
* De-duplicate if ?_col= passed multiple times
* 400 error if user tries to ?_nocol= a primary key
* Documentation for ?_col= and ?_nocol=
2021-05-26 21:17:43 -07:00
Simon Willison eae3084b46 Fixed another Jinja warning, refs #1338 2021-05-24 10:52:09 -07:00
Simon Willison 2bd9d54b27 Fix Jinja warnings, closes #1338, refs #1331 2021-05-23 18:41:50 -07:00
Simon Willison a443dba82f Release 0.57a0
Refs #1281, #1282, #1289, #1290, #1308, #1313, #1314, #1321, #1323, #1325, #1330, #1332, #1335
2021-05-22 17:45:54 -07:00
Simon Willison 9789b94da4 ?_facet_size=100 parameter, closes #1332 2021-05-22 17:34:33 -07:00
Simon Willison a4bb2abce0 Show primary key cells in bold without affecting columns called 'link', closes #1308 2021-04-23 23:07:37 -07:00
Simon Willison 87b583a128 Clearer help text for --reload
Immutable databases are not commonly used, but it's useful to clarify
that --reload will pick up on changes to metadata.
2021-04-02 13:20:51 -07:00
Marjorie Roswell 7b1a9a1999
Fix little typo (#1282) 2021-03-29 12:57:34 -07:00
Simon Willison af5a7f1c09 Release 0.56
Refs #1005, #1031, #1141, #1229, #1236, #1239, #1246, #1247, #1252, #1266, #1276, #1278
2021-03-28 17:41:12 -07:00
Simon Willison d579fcf4f7 Applied some fixes suggested by @withshubh in #1260 2021-03-28 17:20:55 -07:00
Campbell Allen f92d823766
ensure immutable databses when starting in configuration directory mode with (#1229)
* check if immutables is empty list of None
* update docs on how to create the inspect-data.json
2021-03-28 17:17:31 -07:00
Bob Whitelock e72397d65b
Add styling to lists within table cells (fixes #1141) (#1252)
This overrides the Datasette reset (see
d0fd833b8c/datasette/static/app.css (L35-L38)),
to add back the default styling of list items displayed within Datasette
table cells.
2021-03-28 17:14:04 -07:00
Simon Willison 48d5e0e6ac Fix for no such table: pragma_database_list, refs #1276 2021-03-28 16:44:29 -07:00
Simon Willison 6ad544df5e Fixed master -> main in a bunch of places, mainly docs 2021-03-23 09:19:41 -07:00
Konstantin Baikov 8e18c79431
Use context manager instead of plain open (#1211)
Context manager with open closes the files after usage.

When the object is already a pathlib.Path i used read_text
write_text functions

In some cases pathlib.Path.open were used in context manager,
it is basically the same as builtin open.

Thanks, Konstantin Baikov!
2021-03-11 08:15:49 -08:00
Simon Willison 7c87532acc New .add_memory_database() method, closes #1247 2021-02-28 20:02:18 -08:00
Simon Willison 47eb885cc2 JSON faceting now suggested even if column has blank strings, closes #1246 2021-02-28 19:44:04 -08:00
Simon Willison 726f781c50 Fix for arraycontains bug, closes #1239 2021-02-22 16:22:47 -08:00
Simon Willison 1f9cca33b4 Resizable SQL editor using cm-resize, refs #1236 2021-02-19 15:47:52 -08:00
Simon Willison cb8a293bd7 Release 0.55
Refs #1205, #1207, #1214, #1221, #1226, #1227, #1232, #1235
2021-02-18 18:01:06 -08:00
Simon Willison 6f41c8a2be
--crossdb option for joining across databases (#1232)
* Test for cross-database join, refs #283
* Warn if --crossdb used with more than 10 DBs, refs #283
* latest.datasette.io demo of --crossdb joins, refs #283
* Show attached databases on /_memory page, refs #283
* Documentation for cross-database queries, refs #283
2021-02-18 14:09:12 -08:00
Simon Willison 36a44bffbf Validation for --port, closes #1226 2021-02-18 10:05:27 -08:00
Simon Willison eda652cf6e
--ssl-keyfile and --ssl-certfile options to "datasette serve"
Closes #1221
2021-02-11 16:52:16 -08:00
Simon Willison 3a3de76009 Release 0.54.1
Refs #1214
2021-02-02 13:24:05 -08:00
Simon Willison 7a2ed9f8a1 Fixed bug with ?_sort= and ?_search=, closes #1214 2021-02-02 13:21:03 -08:00
Simon Willison 1600d2a3ec Renamed /:memory: to /_memory, with redirects - closes #1205 2021-01-28 14:48:56 -08:00
Simon Willison 0b9ac1b2e9
Release 0.54
Refs #509, #1091, #1150, #1151, #1166, #1167, #1178, #1181, #1182, #1184, #1185, #1186, #1187, #1194, #1198
2021-01-25 09:33:29 -08:00
Simon Willison a5ede3cdd4 Fixed bug loading database called 'test-database (1).sqlite'
Closes #1181.

Also now ensures that database URLs have special characters URL-quoted.
2021-01-24 21:13:05 -08:00
Simon Willison 07e1635615 All ?_ parameters now copied to hidden form fields, closes #1194 2021-01-24 19:10:10 -08:00
Simon Willison 25c2933667 publish heroku now uses python-3.8.7 2021-01-22 16:46:25 -08:00
Simon Willison 57f4d7b82f Release 0.54a0
Refs #1091, #1145, #1151, #1156, #1157, #1158, #1166, #1170, #1178, #1182, #1184, #1185, #1186, #1187
2021-01-19 12:47:30 -08:00
Simon Willison c38c42948c extra_body_script module support, closes #1187 2021-01-13 18:14:33 -08:00
Simon Willison fa0c3777b8 script type=module support, closes #1186 2021-01-13 17:50:52 -08:00
Simon Willison 640ac7071b Better PRAGMA error message, closes #1185 2021-01-12 14:26:19 -08:00
Simon Willison 8e8fc5cee5 Applied Black 2021-01-11 13:34:38 -08:00
Simon Willison 649f48cd70 request.full_path property, closes #1184 2021-01-11 13:32:58 -08:00
Simon Willison e1efa9b7a3 force_https_urls on for publish cloudrun, refs #1178 2021-01-06 10:13:34 -08:00
Simon Willison a93a65b027
Fixed Prettier formatting, closes #1166 2020-12-31 13:46:32 -08:00
Simon Willison 80870911de
Trying out bad formatting, refs #1166 2020-12-31 13:44:47 -08:00
Simon Willison 5193d0b3e4 Apply prettier to table.js, refs #1166 2020-12-31 13:27:39 -08:00
Simon Willison 6705560148 Refactor out sqlite_extensions option 2020-12-29 14:16:05 -08:00
Miroslav Šedivý a882d67962
Modernize code to Python 3.6+ (#1158)
* Compact dict and set building
* Remove redundant parentheses
* Simplify chained conditions
* Change method name to lowercase
* Use triple double quotes for docstrings

Thanks, @eumiro!
2020-12-23 09:04:32 -08:00
Simon Willison 90eba4c3ca Prettier CREATE TABLE SQL for _internal 2020-12-22 15:55:43 -08:00
Simon Willison 8919f99c2f Improved .add_database() method design
Closes #1155 - _internal now has a sensible name

Closes #509 - Support opening multiple databases with the same stem
2020-12-22 12:04:18 -08:00
Simon Willison 270de6527b Foreign keys for _internal database
Refs #1099 - Datasette now uses compound foreign keys internally,
so it would be great to link them correctly.
2020-12-22 11:48:54 -08:00
Simon Willison bc1f1e1ce8 Compound primary key for foreign_keys table in _internal 2020-12-22 11:04:29 -08:00
Simon Willison 810853c5f2 Use time.perf_counter() instead of time.time(), closes #1157 2020-12-21 13:49:14 -08:00
Simon Willison dcdfb2c301 Rename _schemas to _internal, closes #1156 2020-12-21 11:48:06 -08:00
Simon Willison ebc7aa287c In-memory _schemas database tracking schemas of attached tables, closes #1150 2020-12-18 14:34:05 -08:00
Simon Willison 5e9895c67f Database(memory_name=) for shared in-memory databases, closes #1151 2020-12-17 17:01:18 -08:00
Simon Willison 0c616f732c Release 0.53
Refs #1132, #1135, #1133, #1138, #1137
2020-12-10 17:44:36 -08:00
Simon Willison 967cc05545 Powered by links to datasette.io, closes #1138 2020-12-10 15:37:08 -08:00
Simon Willison 2c0aca4887 _header=off option for CSV export, closes #1133 2020-12-10 15:28:44 -08:00
Simon Willison 387b471b88 Release 0.52.5
Refs #1134
2020-12-09 12:13:14 -08:00
Simon Willison 6000d1a724 Fix for combining ?_search_x and ?_searchmode=raw, closes #1134 2020-12-09 11:56:44 -08:00
Simon Willison fe86d85308 datasette serve --create option, closes #1135 2020-12-09 11:45:45 -08:00
Simon Willison 4c25b035b2 arraynotcontains filter, closes #1132 2020-12-07 14:41:03 -08:00
Simon Willison 2dc281645a Release 0.52.4
Refs #1125, #1131, #1094
2020-12-05 11:41:40 -08:00
Abdussamet Koçak 705d1a1555
Fix startup error on windows (#1128)
Fixes https://github.com/simonw/datasette/issues/1094

This import isn't used at all, and causes error on startup on Windows.
2020-12-05 11:35:03 -08:00
Simon Willison eae103a82b Write errors to stderr, closes #1131 2020-12-04 21:21:11 -08:00
Simon Willison 49d8fc0568 Try pysqlite3-binary version as well, refs #1125 2020-12-03 20:07:16 -08:00
Simon Willison 00185af74a Show pysqlite3 version on /-/versions, if installed - #1125 2020-12-03 14:08:50 -08:00
Simon Willison 4cce551666 Release 0.52.3
Refs #1124
2020-12-03 11:07:05 -08:00
Simon Willison ca6e8e53dc More helpful 404 messages, refs #1124 2020-12-03 11:05:12 -08:00
Simon Willison 63efcb35ce More tweaks to root_path handling, refs #1124 2020-12-03 11:02:53 -08:00
Simon Willison 6b4c55efea Fix for Amazon Linux static assets 404ing, refs #1124 2020-12-03 10:53:26 -08:00
Simon Willison e048791a9a Release 0.52.2
Refs #1116, #1115, #1100, #749, #1121
2020-12-02 16:57:40 -08:00
Simon Willison a45a3dff3e Fix for OPTIONS request against /db, closes #1100 2020-12-02 16:49:55 -08:00
Abdussamet Koçak daae35be46
Fix misaligned table actions cog
Closes #1121. Thanks, @abdusco
2020-12-02 16:33:36 -08:00
Simon Willison 88ac538b41 transfer-encoding: chunked for DB downloads, refs #749
This should get >32MB downloads working on Cloud Run.
2020-12-02 15:47:37 -08:00
Simon Willison 17cbbb1f7f
generated_columns table in fixtures.py, closes #1119 2020-11-30 16:28:02 -08:00
Simon Willison 461670a0b8
Support for generated columns
* Support for generated columns, closes #1116
* Show SQLite version in pytest report header
* Use table_info() if SQLite < 3.26.0
* Cache sqlite_version() rather than re-calculate every time
* Adjust test_database_page for SQLite 3.26.0 or higher
2020-11-30 13:29:57 -08:00
Simon Willison 49b6297fb7 Typo fix: messagge_is_html, closes #1118 2020-11-30 13:24:23 -08:00
Simon Willison dea3c508b3 Revert "Support for generated columns, closes #1116" - it failed CI
This reverts commit 37f87b5e52.
2020-11-30 12:09:32 -08:00
Simon Willison 37f87b5e52 Support for generated columns, closes #1116 2020-11-30 12:01:15 -08:00
Simon Willison c745c2715a Moved comment for clarity 2020-11-29 12:27:34 -08:00
Simon Willison 09033c08be Suggest --load-extension=spatialite, closes #1115 2020-11-29 12:13:16 -08:00
Simon Willison 242bc89fdf Release 0.52.1
Refs #1098, #1102, #1114
2020-11-29 11:38:29 -08:00
Simon Willison deb0be4ae5 Fix bug where compound foreign keys produced broken links, closes #1098 2020-11-29 11:30:17 -08:00
Simon Willison e800ffcf7c
/usr/local/lib/mod_spatialite.so
Closes #1114
2020-11-29 09:37:43 -08:00
Simon Willison a8e66f9065 Release 0.52
Refs #992, #1103, #1104, #1107, #1077, #1110, #1089, #1086, #1088, #1084
2020-11-28 15:54:35 -08:00
Simon Willison 37d18a5bce datasette publish cloudrun --apt-get-install, closes #1110 2020-11-24 19:05:35 -08:00
Simon Willison f2e2bfcdd9 Renamed datasette.config() to .setting(), closes #1107 2020-11-24 14:06:32 -08:00
Simon Willison 5a77f7a649 Updated docs renaming config to settings
- config.html is now settings.html
- ConfigOption in app.py is now Setting
- updated documentation unit tests

Refs #1106
2020-11-24 13:22:33 -08:00
Simon Willison 33eadb8782 config.json is now settings.json, closes #1104 2020-11-24 12:37:29 -08:00
Simon Willison 2a3d5b720b Redirect /-/config to /-/settings, closes #1103 2020-11-24 12:19:14 -08:00
Simon Willison 3159263f05 New --setting to replace --config, closes #992 2020-11-24 12:01:47 -08:00
Simon Willison 4bac9f18f9 Fix off-screen action menu bug, refs #1084 2020-11-21 15:33:04 -08:00
Simon Willison 30e64c8d3b
Use f-strings in place of .format()
Code transformed like so:

    pip install flynt
    flynt .
    black .
2020-11-15 15:24:22 -08:00
Simon Willison 253f2d9a3c Use correct QueryInterrupted exception on row page, closes #1088 2020-11-11 20:36:44 -08:00
Simon Willison 2a981e2ac1 Blank foreign key labels now show as hyphens, closes #1086 2020-11-11 15:44:04 -08:00
Simon Willison d6257e3a7b Add database/table actions to pattern portfolio
Refs #1066, #1077
2020-11-02 10:53:52 -08:00
Simon Willison 7b19492070 database_actions() plugin hook, closes #1077 2020-11-02 10:27:25 -08:00
Simon Willison b61f6cceb5 Add nav menu to pattern portfolio 2020-11-01 09:22:13 -08:00
Simon Willison 4785172bbc Release 0.51.1 2020-10-31 20:33:47 -07:00
Simon Willison d53d747e6a Release 0.51
Refs #1014, #1016, #1019, #1023, #1027, #1028, #1033, #1034, #1036, #1039

Closes #1076
2020-10-31 15:21:49 -07:00
Simon Willison a4ca26a265 Address PrefixedUrlString bug in #1075 2020-10-31 13:35:47 -07:00
Simon Willison 84bc7244c1 datasette.client now applies base_url, closes #1026 2020-10-31 12:29:42 -07:00
Simon Willison 7a67bc7a56 datasette.urls methods will not apply base_url prefix twice, refs #1026 2020-10-31 12:11:40 -07:00
Simon Willison c1d386ef67 Refactor Urls into url_builder.py
Refs #1026
2020-10-31 11:43:36 -07:00
Simon Willison 11eb1e026f datasette.urls.table(..., format="json"), closes #1035
Also improved tests for datasette.urls and added format= to some other methods
2020-10-31 11:16:28 -07:00
Simon Willison f0a740ac21 Remove load_plugin hook - closes #1073
Refs #1042

This reverts commit 81dea4b07a.
2020-10-31 09:21:22 -07:00
Simon Willison a2a7090720 Display messages in right place, closes #1071 2020-10-30 13:12:57 -07:00
Simon Willison 393f1b49d7 Updated nav in pattern portfolio 2020-10-30 13:12:01 -07:00
Simon Willison 59ab24af6b Release 0.51a2
Refs #1068, #1042, #1054
2020-10-30 10:56:02 -07:00
Simon Willison 0cb29498c7 Fixed bug with python tests/fixtures.py
https://github.com/simonw/datasette/runs/1333357885?check_suite_focus=true
2020-10-30 10:54:47 -07:00
Simon Willison 81dea4b07a
load_template() plugin hook
Closes #1042
2020-10-30 10:47:18 -07:00
Simon Willison fcf43589eb Link to homepage in nav on show-json page 2020-10-30 08:54:01 -07:00
Simon Willison 222f79bb4c debug-menu permission, closes #1068
Also added tests for navigation menu logic.
2020-10-30 08:41:57 -07:00
Simon Willison 9f0987cb57 cursor: pointer; on the new menu icons
Refs #1064, #1066
2020-10-29 22:55:10 -07:00
Simon Willison 0e1e89c6ba Release 0.51a1
Refs #1056, #1039, #998, #1045, #1033, #1036, #1034, #976, #1057, #1058, #1053, #1064, #1066
2020-10-29 22:35:23 -07:00
Simon Willison 2f7731e9e5 table_actions() plugin hook plus menu, closes #1066
Refs #690
2020-10-29 22:16:41 -07:00
Simon Willison 8a4639bc43 Applied Black 2020-10-29 22:14:33 -07:00
Simon Willison 561c1d2d36 Show logout link if they are logged in AND have ds_actor cookie
Otherwise an expired cookie will still cause the logout link to show.
2020-10-29 20:51:37 -07:00
Simon Willison 18a64fbb29
Navigation menu plus menu_links() hook
Closes #1064, refs #690.
2020-10-29 20:45:15 -07:00
Simon Willison 178b7e8749 .csv now links to .blob downloads
Closes #1063, closes #1034
2020-10-29 15:47:32 -07:00
Simon Willison 78b3eeaad9
.blob output renderer
* _blob_hash= checking plus refactored to use new BadRequest class, refs #1050
* Replace BlobView with new .blob renderer, closes #1050
* .blob downloads on arbitrary queries, closes #1051
2020-10-29 15:01:38 -07:00
Simon Willison 89519f9a37 Fixed bug with download of BLOB null, refs #1050 2020-10-28 21:05:40 -07:00
Simon Willison cefd058c1c
New explicit versioning mechanism
Closes #1054
2020-10-28 20:38:15 -07:00
Simon Willison abcf022249
Margin bottom on metadata description 2020-10-28 10:11:07 -07:00