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
b50bf5d13f
Don't persist _next in hidden field, closes #1483
2021-10-13 14:08:06 -07:00
Simon Willison
875117c343
Fix bug with ?_next=x&_sort=rowid, closes #1470
2021-10-09 18:14:56 -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
ca4f83dc7b
Rename config= to settings=, refs #1432
2021-08-12 18:10:36 -07:00
Simon Willison
e837095ef3
Column metadata, closes #942
2021-08-12 16:53:23 -07:00
Simon Willison
66e143c76e
New hide_sql canned query option, refs #1422
2021-08-06 22:17:36 -07:00
Simon Willison
4adca0d850
No hidden SQL on canned query pages, closes #1411
2021-07-31 17:58:11 -07:00
Simon Willison
4a3e8561ab
Default 405 for POST, plus tests
2021-06-23 15:40:09 -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
8f311d6c1d
Correctly escape output of ?_trace, refs #1360
2021-06-05 15:03:38 -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
d5d387abfe
Applied Black, refs #1305
2021-06-01 21:30:44 -07:00
Simon Willison
80d8b0eb41
Test demonstrating fixed #1305 , refs #1306
2021-06-01 21:26:25 -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
807de378d0
/-/databases and homepage maintain connection order, closes #1216
2021-06-01 20:10:15 -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
6ad544df5e
Fixed master -> main in a bunch of places, mainly docs
2021-03-23 09:19:41 -07:00
Simon Willison
cc6774cbaa
Upgrade httpx and remove xfail from tests, refs #1005
2021-02-28 14:34:44 -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
640ac7071b
Better PRAGMA error message, closes #1185
2021-01-12 14:26:19 -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
967cc05545
Powered by links to datasette.io, closes #1138
2020-12-10 15:37:08 -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
deb0be4ae5
Fix bug where compound foreign keys produced broken links, closes #1098
2020-11-29 11:30:17 -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
2a981e2ac1
Blank foreign key labels now show as hyphens, closes #1086
2020-11-11 15:44:04 -08:00
Simon Willison
a4ca26a265
Address PrefixedUrlString bug in #1075
2020-10-31 13:35:47 -07:00
Simon Willison
bf18b9ba17
Stop using plugin-example.com, closes #1074
2020-10-31 12:47:42 -07:00
Simon Willison
d6db47f5c1
Deploy demo plugins to latest.datasette.io, refs #1074
2020-10-31 10:36:46 -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
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
e5f5034bcd
Fixed broken footer test
2020-10-27 12:39:55 -07:00
Simon Willison
5db7ae3ce1
Link to BLOB downloads, closes #1046
2020-10-24 17:13:14 -07:00
Simon Willison
5a15197960
/db/table/-/blob/pk/column.blob download URL, refs #1036
2020-10-24 16:09:18 -07:00
Simon Willison
29a977a74e
New app_client_base_url_prefix fixture
2020-10-24 12:03:24 -07:00
Simon Willison
091441a444
Fixed remaining places that needed datasette.urls, closes #1025
2020-10-19 22:21:19 -07:00
Simon Willison
f3a087a578
Edit SQL button on canned queries, closes #1019
2020-10-13 20:44:18 -07:00
Simon Willison
7239175f63
Fixed broken column header links, closes #1011
2020-10-09 20:51:56 -07:00
Simon Willison
9f6dd985bc
Fix broken CSV/JSON export on query page, refs #1010
2020-10-09 17:39:45 -07:00
Simon Willison
c13d184704
Emergency fix for broken links in 0.50, closes #1010
2020-10-09 17:33:13 -07:00
Simon Willison
8f97b9b58e
datasette.client internal requests mechanism
...
Closes #943
* Datasette now requires httpx>=0.15
* Support OPTIONS without 500, closes #1001
* Added internals tests for datasette.client methods
* Datasette's own test mechanism now uses httpx to simulate requests
* Tests simulate HTTP 1.1 now
* Added base_url in a bunch more places
* Mark some tests as xfail - will remove that when new httpx release ships: #1005
2020-10-09 09:11:24 -07:00
Simon Willison
7249ac5ca0
Support OPTIONS without 500, closes #1001
2020-10-08 18:43:53 -07:00
Simon Willison
5a184a5d21
Display column type in column action menu, closes #993
...
Also added new documented db.table_column_details() introspection method.
2020-10-05 17:32:10 -07:00
Simon Willison
0f2626868b
Much improved column menu display logic, refs #981
...
* Menu links now take into account existing querystring
* No longer shows facet option for primary key columns
* Conditionally displays sort/sort-desc if already sorted
* Does not show facet option if already faceted by this
2020-09-30 16:01:37 -07:00
Simon Willison
97c71c3a3b
Fixed test for column sorting, refs #981
2020-09-30 14:51:10 -07:00
Simon Willison
ea340cf320
Correctly persist selected facets in hidden fields
...
Closes #963
2020-09-12 14:54:01 -07:00
Simon Willison
799ecae948
register_output_renderer can now return Response, closes #953
2020-08-27 21:02:50 -07:00
Simon Willison
8e7e6458a6
Fix bug with ?_nl=on and binary data, closes #914
2020-08-16 11:26:49 -07:00
Simon Willison
41ddc19756
Docs now live at docs.datasette.io ( #937 )
2020-08-15 16:57:05 -07:00
Simon Willison
0748a65a22
Fixed content-disposition header on DB download, closes #909
2020-07-29 14:34:22 -07:00
Simon Willison
213e6a8926
content-length for DB downloads, closes #905
2020-07-21 21:52:35 -07:00
Simon Willison
57879dc8b3
Better titles for canned query pages, closes #887
2020-07-01 17:23:37 -07:00
Simon Willison
35aee82c60
Fixed 500 error with /favicon.ico, closes #874
2020-06-28 21:27:11 -07:00
Simon Willison
1f55a4a2b6
Release notes for 0.45a3
2020-06-27 20:22:49 -07:00
Simon Willison
335f26a0f7
/fixtures/magic_parameters demo, refs #842
2020-06-27 20:11:01 -07:00
Simon Willison
b59b92b1b0
Fix for tests - order was inconsistent, refs #852
2020-06-18 16:52:16 -07:00
Simon Willison
6c26345836
New plugin hook: canned_queries(), refs #852
2020-06-18 16:35:15 -07:00
Simon Willison
647c5ff0f3
Fixed broken CSS on 404 page, closes #777
2020-06-08 17:35:23 -07:00
Simon Willison
49d6d2f7b0
allow_sql block to control execute-sql upermission in metadata.json, closes #813
...
Also removed the --config allow_sql:0 mechanism in favour of the new allow_sql block.
2020-06-08 17:05:44 -07:00
Simon Willison
cc218fa9be
Move assert_permissions_checked() calls from test_html.py to test_permissions.py, refs #811
2020-06-08 07:02:31 -07:00
Simon Willison
9b42e1a4f5
view-database permission
...
Also now using 🔒 to indicate private resources - resources that
would not be available to the anonymous user. Refs #811
2020-06-07 20:50:37 -07:00
Simon Willison
613fa551a1
Removed view-row permission, for the moment - refs #811
...
https://github.com/simonw/datasette/issues/811#issuecomment-640338347
2020-06-07 20:14:27 -07:00
Simon Willison
abc7339124
Nicer pattern for make_app_client() in tests, closes #395
2020-06-07 14:14:10 -07:00
Simon Willison
a1e801453a
Renamed execute-query permission to execute-sql, refs #811
2020-06-07 13:20:59 -07:00
Simon Willison
4340845754
Nested permission checks for all views, refs #811
2020-06-07 13:03:08 -07:00
Simon Willison
86dec9e8ff
Added permission check to every view, closes #808
2020-06-06 22:30:36 -07:00
Simon Willison
5278c04682
More consistent use of response.text/response.json in tests, closes #792
2020-06-02 14:29:12 -07:00
Simon Willison
52c4387c7d
Redesigned register_output_renderer plugin hook, closes #581
2020-05-27 19:21:41 -07:00
Simon Willison
ad88c9b3f3
Mechanism for adding a default URL fragment to a canned query
...
Closes #767
2020-05-27 14:52:03 -07:00
Simon Willison
5ea8c6d1cd
type-pk instead of type-link CSS class, closes #729
2020-05-14 22:55:20 -07:00
Simon Willison
504196341c
Visually distinguish float/int columns, closes #729
2020-05-14 22:51:39 -07:00
Simon Willison
9424687e9e
Consistently return charset utf-8, closes #752
2020-05-04 10:42:10 -07:00
Simon Willison
304e7b1d9f
Mechanism for creating custom pages using templates
...
Closes #648
2020-04-26 11:46:43 -07:00
Simon Willison
15e2321804
Extra body CSS class for canned queries, closes #727
2020-04-15 14:07:28 -07:00
Simon Willison
d55fe8cdfc
Fixed bug with Templates considered comment, closes #689
2020-04-05 12:38:33 -07:00
Simon Willison
e89b0ef2f9
Expose extra_template_vars in _contex=1, refs #693
2020-04-05 11:49:15 -07:00
Simon Willison
6aa516d82d
Run base_url tests against /fixtures/facetable too, refs #712
2020-03-25 19:31:22 -07:00
Simon Willison
7656fd64d8
base_url configuration setting, closes #394
...
* base_url configuration setting
* base_url works for static assets as well
2020-03-24 17:18:43 -07:00
Simon Willison
a498d0fe65
Fix bug with over-riding default sort, closes #702
2020-03-21 19:40:29 -07:00
Simon Willison
236aa065b2
"sort" and "sort_desc" metadata properties, closes #702
2020-03-21 19:28:35 -07:00
Simon Willison
2c0e1e09bc
Show sort arrow on primary key by default
...
Closes #677 . Refs #702 .
2020-03-21 16:57:37 -07:00
Simon Willison
d54318fc7f
Added template_debug setting, closes #654
2019-12-22 16:04:45 +00:00
Simon Willison
d3e1c3017e
Display 0 results, closes #637
2019-11-22 22:07:01 -08:00
Simon Willison
440a70428c
Include rowid in filter select, closes #636
2019-11-19 15:01:10 -08:00
Simon Willison
28c4a6db5b
CREATE INDEX statements on table page, closes #618
2019-11-09 17:29:36 -08:00
Tobias Kunze
931bfc6661
Handle spaces in DB names ( #590 )
...
Closes #503 - thanks, @rixx
2019-11-04 15:16:30 -08:00
Simon Willison
14da70525b
Don't show 'None' as label for nullable foreign key, closes #406
2019-11-02 15:29:40 -07:00
Simon Willison
e2c390500e
Persist _where= in hidden fields, closes #604
2019-10-30 11:49:26 -07:00
Tobias Kunze
12cec411ca
Display metadata footer on custom SQL queries ( #589 )
...
Closes #408 - thanks, @rixx!
2019-10-13 20:53:21 -07:00
Tobias Kunze
908fc3999e
Sort databases on homepage by argument order - #591
...
Closes #585 - thanks, @rixx!
2019-10-13 20:52:33 -07:00
Abdus
74ecf8a7cc
Fix static mounts using relative paths and prevent traversal exploits ( #554 )
...
Thanks, @abdusco! Closes #555
2019-07-11 09:13:19 -07:00
Simon Willison
13e4f9a676
Unit test for _table custom template, refs #521
2019-07-02 20:23:05 -07:00
Simon Willison
ba8db9679f
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-06-23 20:13:09 -07:00
Simon Willison
f4eefdf193
Do not allow downloads of mutable databases - closes #474
2019-05-19 13:41:09 -07:00