Commit graph

591 commits

Author SHA1 Message Date
Simon Willison
f7d3e76fb3 Facets now execute ignoring ?_col and ?_nocol, fixes #1345 2021-05-30 22:31:14 -04:00
Simon Willison
4545120c92 Test and docs for ?_facet_size=max, refs #1337 2021-05-27 09:04:26 -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
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
2bd9d54b27 Fix Jinja warnings, closes #1338, refs #1331 2021-05-23 18:41:50 -07:00
Simon Willison
9789b94da4 ?_facet_size=100 parameter, closes #1332 2021-05-22 17:34:33 -07:00
Simon Willison
0a7621f96f
Use pytest-xdist to speed up tests (#1290)
* Run tests in CI using pytest-xdist
* Documentation for pytest-xdist

Closes #1289
2021-04-02 20:42:28 -07:00
Simon Willison
d579fcf4f7 Applied some fixes suggested by @withshubh in #1260 2021-03-28 17:20:55 -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
cc6774cbaa Upgrade httpx and remove xfail from tests, refs #1005 2021-02-28 14:34:44 -08:00
Simon Willison
726f781c50 Fix for arraycontains bug, closes #1239 2021-02-22 16:22:47 -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
9603d893b9 Tests for --ssl-keyfile and --ssl-certfile, refs #1221 2021-02-11 16:53:20 -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
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
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
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
ef2ecc1b89 Standardize on 'query string', not 'querystring', in docs
The request property is request.query_string so this is more consistent.
2021-01-11 13:33:54 -08:00
Simon Willison
649f48cd70 request.full_path property, closes #1184 2021-01-11 13:32:58 -08:00
Simon Willison
faa76390a0 Fixed bug introduced in e1efa9b7, refs #1178 2021-01-07 16:01:01 -08:00
Simon Willison
97fb10c17d Applied Black, refs #1178 2021-01-06 10:22:20 -08:00
Simon Willison
e1efa9b7a3 force_https_urls on for publish cloudrun, refs #1178 2021-01-06 10:13:34 -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
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
bc1f1e1ce8 Compound primary key for foreign_keys table in _internal 2020-12-22 11:04:29 -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
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
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
eae103a82b Write errors to stderr, closes #1131 2020-12-04 21:21:11 -08:00
Simon Willison
42efb799ea Fixed invalid test for generated columns, refs #1119 2020-12-04 21:20:12 -08:00
Simon Willison
13c960c03b Test is no longer order dependent, closes #1123 2020-12-02 16:49:55 -08:00
Simon Willison
a45a3dff3e Fix for OPTIONS request against /db, closes #1100 2020-12-02 16:49:55 -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
dea3c508b3 Revert "Support for generated columns, closes #1116" - it failed CI
This reverts commit 37f87b5e52.
2020-11-30 12:09:32 -08:00