Commit graph

186 commits

Author SHA1 Message Date
Simon Willison
a4ca26a265 Address PrefixedUrlString bug in #1075 2020-10-31 13:35:47 -07:00
Simon Willison
d6db47f5c1 Deploy demo plugins to latest.datasette.io, refs #1074 2020-10-31 10:36:46 -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
81dea4b07a
load_template() plugin hook
Closes #1042
2020-10-30 10:47:18 -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
18a64fbb29
Navigation menu plus menu_links() hook
Closes #1064, refs #690.
2020-10-29 20:45:15 -07:00
Simon Willison
89519f9a37 Fixed bug with download of BLOB null, refs #1050 2020-10-28 21:05:40 -07:00
Simon Willison
c3aba4aa98 --cors for /name.db downloads, refs #1057 2020-10-27 13:39:57 -07:00
Simon Willison
29a977a74e New app_client_base_url_prefix fixture 2020-10-24 12:03:24 -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
a648bb82ba Upgrade to Black 20.8b1, closes #958 2020-09-02 15:24:55 -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
e139a7619f
'datasette --get' option, closes #926
Also made a start on the datasette.utils.testing module, refs #898
2020-08-11 17:24:40 -07:00
Simon Willison
549b1c2063 New forbidden() plugin hook, closes #812 2020-06-30 21:17:38 -07:00
Simon Willison
d6e03b0430 Cascading view permissions, closes #832
- If you have table permission but not database permission you can now view the table page
- New BaseView.check_permissions() method
2020-06-30 16:40:50 -07:00
Simon Willison
51427323e6 Add message when user logs out, refs #840 2020-06-29 11:31:35 -07:00
Simon Willison
0991ea75cc Renamed _timestamp to _now, refs #842, closes #871 2020-06-28 12:47:28 -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
563f5a2d3a
Magic parameters for canned queries
Closes #842

Includes a new plugin hook, register_magic_parameters()
2020-06-27 19:58:16 -07:00
Simon Willison
6c26345836 New plugin hook: canned_queries(), refs #852 2020-06-18 16:35:15 -07:00
Simon Willison
6151c25a5a Respect existing scope["actor"] if set, closes #854 2020-06-18 11:37:28 -07:00
Simon Willison
a4ad5a504c Workaround for 'Too many open files' in test runs, refs #846 2020-06-13 17:26:18 -07:00
Simon Willison
d60bd6ad13 Update plugin tests, refs #834 2020-06-13 11:15:33 -07:00
Simon Willison
09a3479a54 New "startup" plugin hook, closes #834 2020-06-13 10:55:41 -07:00
Simon Willison
fba8ff6e76 "$env": "X" mechanism now works with nested lists, closes #837 2020-06-11 17:21:48 -07:00
Simon Willison
57e812d5de ds_author cookie can now expire, closes #829
Refs https://github.com/simonw/datasette-auth-github/issues/62#issuecomment-642152076
2020-06-10 12:39:54 -07:00
Simon Willison
f240970b83 Fixed tests/fixtures.py, closes #804 2020-06-09 12:58:12 -07:00
Simon Willison
f5e79adf26
register_routes() plugin hook (#819)
Fixes #215
2020-06-08 20:12:06 -07:00
Simon Willison
799c5d5357 Renamed resource_identifier to resource, refs #817 2020-06-08 11:59:53 -07:00
Simon Willison
c9f1ec616e Removed resource_type from permissions system, closes #817
Refs #811, #699
2020-06-08 11:51:03 -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
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
3359d54a4e Use cookies when accessing csrftoken_from 2020-06-06 12:33:08 -07:00
Simon Willison
070838bfa1 Better test for Vary header 2020-06-06 12:26:19 -07:00
Simon Willison
f786033a5f Fixed 'datasette plugins' command, with tests - closes #802 2020-06-05 16:46:37 -07:00
Simon Willison
84a9c4ff75
CSRF protection (#798)
Closes #793.

* Rename RequestParameters to MultiParams, refs #799
* Allow tuples as well as lists in MultiParams, refs #799
* Use csrftokens when running tests, refs #799
* Use new csrftoken() function, refs https://github.com/simonw/asgi-csrf/issues/7
* Check for Vary: Cookie hedaer, refs https://github.com/simonw/asgi-csrf/issues/8
2020-06-05 12:05:57 -07:00
Simon Willison
aa82d03704
Basic writable canned queries
Refs #698. First working version of this feature.

* request.post_vars() no longer discards empty values
2020-06-03 08:16:50 -07:00
Simon Willison
4fa7cf6853 Flash messages mechanism, closes #790 2020-06-02 14:12:18 -07:00
Simon Willison
9f3d4aba31 --root option and /-/auth-token view, refs #784 2020-05-31 18:16:42 -07:00
Simon Willison
75cd432e5a Ability to set custom table/view page size in metadata, closes #751 2020-05-27 22:00:04 -07:00
Simon Willison
446e5de65d Refactored test plugins into tests/plugins, closes #775 2020-05-27 17:57:25 -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
304e7b1d9f
Mechanism for creating custom pages using templates
Closes #648
2020-04-26 11:46:43 -07:00
Simon Willison
b07312c2b3 dedent SQL for neighborhood_search fixture
Makes this page a little prettier:
https://latest.datasette.io/fixtures/neighborhood_search
2020-04-02 17:54:27 -07:00
Simon Willison
2aaad72789 Refactor template setup into Datasette constructor
Closes #707
2020-03-26 18:12:43 -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
236aa065b2 "sort" and "sort_desc" metadata properties, closes #702 2020-03-21 19:28:35 -07:00
Simon Willison
7f5a330377
Don't count rows on homepage for DBs > 100MB (#688)
Closes #649.
2020-02-28 17:08:29 -08:00