Wykres commitów

118 Commity (f3944608cc000a2542b4fe9a7a89c866391924f2)

Autor SHA1 Wiadomość Data
Simon Willison f3944608cc Partial json_renderer refactor, part of #2136 2023-08-09 11:52:51 -07:00
Simon Willison 26be9f0445 Refactored canned query code, replaced old QueryView, closes #2114 2023-08-09 08:26:52 -07:00
Simon Willison cd57b0f712 Brought back parameter fields, closes #2132 2023-08-08 06:45:04 -07:00
Simon Willison 1377a290cd
New JSON design for query views (#2118)
* Refs #2111, closes #2110
* New Context dataclass/subclass mechanism, refs #2127
* Define QueryContext and extract get_tables() method, refs #2127
* Fix OPTIONS bug by porting DaatbaseView to be a View subclass
* Expose async_view_for_class.view_class for test_routes test
* Error/truncated aruments for renderers, closes #2130
2023-08-07 18:47:39 -07:00
Simon Willison 18dd88ee4d Refactored DatabaseDownload to database_download, closes #2116 2023-07-26 11:43:55 -07:00
Simon Willison d97e82df3c
?_extra= support and TableView refactor to table_view
* Implemented ?_extra= option for JSON views, refs #262
* New dependency: asyncinject
* Remove now-obsolete TableView class
2023-03-22 15:49:39 -07:00
Simon Willison 0b4a286914 render_cell(..., request) argument, closes #2007 2023-01-27 19:34:14 -08:00
Simon Willison c094dde3ff Extra permission rules for /-/create, closes #1937 2022-12-14 12:21:18 -08:00
Simon Willison 8bf06a76b5
register_permissions() plugin hook (#1940)
* Docs for permissions: in metadata, refs #1636
* Refactor default_permissions.py to help with implementation of #1636
* register_permissions() plugin hook, closes #1939 - also refs #1938
* Tests for register_permissions() hook, refs #1939
* Documentation for datasette.permissions, refs #1939
* permission_allowed() falls back on Permission.default, refs #1939
* Raise StartupError on duplicate permissions
* Allow dupe permisisons if exact matches
2022-12-12 18:05:54 -08:00
Simon Willison dee18ed8ce test_create_table_error_rows_twice_with_duplicates, refs #1927 2022-12-07 17:29:24 -08:00
Simon Willison 9342b60f14 test_create_table_error_if_pk_changed, refs #1927 2022-12-07 17:27:01 -08:00
Simon Willison 6b27537988 ignore/replace to create requires pk, refs #1927 2022-12-07 17:18:40 -08:00
Simon Willison 93ababe6f7 Initial attempt at insert/replace for /-/create, refs #1927 2022-12-02 23:00:18 -08:00
Simon Willison b8fc8e2cd7
Merge branch 'main' into 1.0-dev 2022-11-29 11:34:39 -08:00
Simon Willison 1154048f79 Compound primary key support for /db/-/create - closes #1911
Needed for tests in #1864
2022-11-29 10:47:48 -08:00
Simon Willison ee64130fa8 Refactor to use new resolve_database/table/row methods, refs #1896 2022-11-18 14:46:25 -08:00
Simon Willison 83a6872d1b Include views in SQL autocomplete, refs #1897 2022-11-17 18:53:48 -08:00
Simon Willison 52bf222d48 /db/-/create API endpoint, closes #1882 2022-11-17 17:24:46 -08:00
Simon Willison 98611b3da0 Include SQL schema for CodeMirror on query pages, closes #1897
Refs #1893
2022-11-17 17:24:44 -08:00
Simon Willison 3e61a41b9b Include SQL schema for CodeMirror on query pages, closes #1897
Refs #1893
2022-11-17 17:19:37 -08:00
Simon Willison 187d91d686 /db/-/create API endpoint, closes #1882 2022-11-14 21:57:28 -08:00
Simon Willison 5be86d48b2 Fix display of padlocks on database page, closes #1848 2022-10-23 19:42:30 -07:00
Simon Willison 78dad236df
check_visibility can now take multiple permissions into account
Closes #1829
2022-10-23 19:11:33 -07:00
Simon Willison 5aa359b869 Apply cell truncation on query page too, refs #1805 2022-09-06 16:58:30 -07:00
Simon Willison d0737e4de5 truncate_cells_html now affects URLs too, refs #1805 2022-09-06 16:50:43 -07:00
Simon Willison c1396bf860 Don't allow canned write queries on immutable DBs, closes #1728 2022-08-14 09:34:31 -07:00
Simon Willison 6373bb3414 Expose current SQLite row to render_cell hook, closes #1300 2022-07-07 09:30:49 -07:00
Simon Willison 280ff372ab ETag support for .db downloads, closes #1739 2022-05-03 07:59:46 -07:00
Simon Willison 0bc5186b7b Tooltip and commas for byte length display, closes #1712 2022-04-12 11:44:12 -07:00
Simon Willison 0159662ab8 Fix for bug running ?sql= against databases with a different route, closes #1682 2022-03-23 11:48:10 -07:00
Simon Willison 1a7750eb29 Documented datasette.check_visibility() method, closes #1678 2022-03-21 12:01:37 -07:00
Simon Willison 194e4f6c3f Removed check_permission() from BaseView, closes #1677
Refs #1660
2022-03-21 11:41:56 -07:00
Simon Willison e627510b76 BaseView.check_permissions is now datasette.ensure_permissions, closes #1675
Refs #1660
2022-03-21 10:13:16 -07:00
Simon Willison 7a6654a253 Databases can now have a .route separate from their .name, refs #1668 2022-03-19 17:11:17 -07:00
Simon Willison 61419388c1 Rename route match groups for consistency, refs #1667, #1660 2022-03-19 09:52:08 -07:00
Simon Willison d4f60c2388
Remove hashed URL mode
Also simplified how view class routing works.

Refs #1661
2022-03-18 17:12:03 -07:00
Simon Willison 8d5779acf0 Refactored alternate_url_json mechanism, refs #1620, #1533 2022-02-02 13:32:47 -08:00
Simon Willison b72b2423c7 rel=alternate JSON for queries and database pages, closes #1620 2022-02-02 13:22:45 -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 4094741c28 Fixed bug with custom templates for writable canned queries, closes #1547 2021-12-19 13:11:57 -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 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 ca4f83dc7b Rename config= to settings=, refs #1432 2021-08-12 18:10:36 -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 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 66e143c76e New hide_sql canned query option, refs #1422 2021-08-06 22:17:36 -07:00
Simon Willison d23a267138 Make request available to menu plugin hooks, closes #1371 2021-06-09 21:45:24 -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 2bd9d54b27 Fix Jinja warnings, closes #1338, refs #1331 2021-05-23 18:41:50 -07:00