Simon Willison
0b2c6a7ebd
Fix for ?_extra=columns bug, closes #2230
...
Also refs #262 - started a test suite for extras.
2024-01-08 13:12:57 -08:00
Simon Willison
1fc76fee62
1.0a8.dev1 version number
...
Not going to release this to PyPI but I will build my own wheel of it
2024-01-05 16:59:25 -08:00
Simon Willison
c7a4706bcc
jinja2_environment_from_request() plugin hook
...
Closes #2225
2024-01-05 14:33:23 -08:00
Simon Willison
872dae1e1a
Fix for CSV labels=on missing foreign key bug, closes #2214
2023-12-22 15:08:11 -08:00
Simon Willison
978249beda
Removed rogue print("max_csv_mb")
...
Found this while working on #2214
2023-12-22 15:07:42 -08:00
Simon Willison
4284c74bc1
db.execute_isolated_fn() method ( #2220 )
...
Closes #2218
2023-12-19 10:51:03 -08:00
Cameron Yick
452a587e23
JavaScript Plugin API, providing custom panels and column menu items
...
Thanks, Cameron Yick.
https://github.com/simonw/datasette/pull/2052
Co-authored-by: Simon Willison <swillison@gmail.com>
2023-10-12 17:00:27 -07:00
Alex Garcia
3d6d1e3050
Raise an exception if a "plugins" block exists in metadata.json
2023-10-12 09:20:50 -07:00
Alex Garcia
35deaabcb1
Move non-metadata configuration from metadata.yaml to datasette.yaml
...
* Allow and permission blocks moved to datasette.yaml
* Documentation updates, initial framework for configuration reference
2023-10-12 09:16:37 -07:00
Simon Willison
836b1587f0
Release notes for 1.0a7
...
Refs #2189
2023-09-21 15:27:27 -07:00
Simon Willison
e4f868801a
Use importlib_metadata for 3.9 as well, refs #2057
2023-09-21 14:58:39 -07:00
Simon Willison
2da1a6acec
Use importlib_metadata for Python 3.8, refs #2057
2023-09-21 13:26:13 -07:00
Simon Willison
b0d0a0e5de
importlib_resources for Python < 3.9, refs #2057
2023-09-21 12:42:15 -07:00
Simon Willison
10bc805473
Finish removing pkg_resources, closes #2057
2023-09-21 12:13:16 -07:00
Simon Willison
b0e5d8afa3
Stop using parallel SQL queries for tables
...
Refs:
- #2189
2023-09-20 15:10:55 -07:00
Simon Willison
852f501485
Switch from pkg_resources to importlib.metadata in app.py, refs #2057
2023-09-16 09:35:18 -07:00
Alex Garcia
b2ec8717c3
Plugin configuration now lives in datasette.yaml/json
...
* Checkpoint, moving top-level plugin config to datasette.json
* Support database-level and table-level plugin configuration in datasette.yaml
Refs #2093
2023-09-13 14:06:25 -07:00
Simon Willison
a4c96d01b2
Release 1.0a6
...
Refs #1765 , #2164 , #2169 , #2175 , #2178 , #2181
2023-09-07 21:44:08 -07:00
Simon Willison
b645174271
actors_from_ids plugin hook and datasette.actors_from_ids() method ( #2181 )
...
* Prototype of actors_from_ids plugin hook, refs #2180
* datasette-remote-actors example plugin, refs #2180
2023-09-07 21:23:59 -07:00
Simon Willison
c26370485a
Label expand permission check respects cascade, closes #2178
2023-09-07 16:28:30 -07:00
Simon Willison
dbfad6d220
Foreign key label expanding respects table permissions, closes #2178
2023-09-07 15:51:09 -07:00
Simon Willison
98ffad9aed
execute-sql now implies can view instance/database, closes #2169
2023-08-31 15:46:26 -07:00
Simon Willison
6bfe104d47
DATASETTE_LOAD_PLUGINS environment variable for loading specific plugins
...
Closes #2164
* Load only specified plugins for DATASETTE_LOAD_PLUGINS=datasette-one,datasette-two
* Load no plugins if DATASETTE_LOAD_PLUGINS=''
* Automated tests in a Bash script for DATASETTE_LOAD_PLUGINS
2023-08-30 15:12:24 -07:00
Simon Willison
30b28c8367
Release 1.0a5
...
Refs #2093 , #2102 , #2153 , #2156 , #2157
2023-08-29 10:17:54 -07:00
Simon Willison
bb12229794
Rename core_ to catalog_, closes #2163
2023-08-29 10:01:28 -07:00
Simon Willison
50da908213
Cascade for restricted token view-table/view-database/view-instance operations ( #2154 )
...
Closes #2102
* Permission is now a dataclass, not a namedtuple - refs https://github.com/simonw/datasette/pull/2154/#discussion_r1308087800
* datasette.get_permission() method
2023-08-29 09:32:34 -07:00
Alex Garcia
92b8bf38c0
Add new `--internal internal.db` option, deprecate legacy `_internal` database
...
Refs:
- #2157
---------
Co-authored-by: Simon Willison <swillison@gmail.com>
2023-08-28 20:24:23 -07:00
Simon Willison
d8351b08ed
datasette --get --actor 'JSON' option, closes #2153
...
Refs #2154
2023-08-28 13:15:38 -07:00
Simon Willison
d9aad1fd04
-s/--setting x y gets merged into datasette.yml, refs #2143 , #2156
...
This change updates the `-s/--setting` option to `datasette serve` to allow it to be used to set arbitrarily complex nested settings in a way that is compatible with the new `-c datasette.yml` work happening in:
- #2143
It will enable things like this:
```
datasette data.db --setting plugins.datasette-ripgrep.path "/home/simon/code"
```
For the moment though it just affects [settings](https://docs.datasette.io/en/1.0a4/settings.html ) - so you can do this:
```
datasette data.db --setting settings.sql_time_limit_ms 3500
```
I've also implemented a backwards compatibility mechanism, so if you use it this way (the old way):
```
datasette data.db --setting sql_time_limit_ms 3500
```
It will notice that the setting you passed is one of Datasette's core settings, and will treat that as if you said `settings.sql_time_limit_ms` instead.
2023-08-28 13:06:14 -07:00
Simon Willison
527cec66b0
utils.pairs_to_nested_config(), refs #2156 , #2143
2023-08-24 11:21:15 -07:00
Simon Willison
bdf59eb7db
No more default to 15% on labels, closes #2150
2023-08-23 11:35:42 -07:00
Simon Willison
2ce7872e3b
-c shortcut for --config - refs #2143 , #2149
2023-08-22 19:33:26 -07:00
Alex Garcia
17ec309e14
Start datasette.json, re-add --config, rm settings.json
...
The first step in defining the new `datasette.json/yaml` configuration mechanism.
Refs #2093 , #2143 , #493
2023-08-22 18:26:11 -07:00
Simon Willison
01e0558825
Merge pull request from GHSA-7ch3-7pp7-7cpq
...
* API explorer requires view-instance permission
* Check database/table permissions on /-/api page
* Release notes for 1.0a4
Refs #2119 , #2133 , #2138 , #2140
Refs https://github.com/simonw/datasette/security/advisories/GHSA-7ch3-7pp7-7cpq
2023-08-22 10:10:01 -07:00
Simon Willison
4535568f2c
Fixed display of database color
...
Closes #2139 , closes #2119
2023-08-10 22:16:19 -07:00
Simon Willison
a3593c9015
on_success_message_sql, closes #2138
2023-08-09 17:32:07 -07:00
Simon Willison
4a42476bb7
datasette plugins --requirements, closes #2133
2023-08-09 15:04:16 -07:00
Simon Willison
19ab4552e2
Release 1.0a3
...
Closes #2135
Refs #262 , #782 , #1153 , #1970 , #2007 , #2079 , #2106 , #2127 , #2130
2023-08-09 12:13:11 -07:00
Simon Willison
e34d09c6ec
Don't include columns in query JSON, refs #2136
2023-08-09 12:01:59 -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
dc5171eb1b
Make editable work with -e '.[test]', refs #2106
2023-07-26 11:28:03 -07:00
Simon Willison
278ac91a4d
datasette install -e option, closes #2106
2023-07-22 11:42:46 -07:00
Simon Willison
2fd871a906
Drop support for Python 3.7, refs #2097
2023-07-08 11:40:19 -07:00
Simon Willison
dda99fc09f
New View base class ( #2080 )
...
* New View base class, closes #2078
* Use new View subclass for PatternPortfolioView
2023-05-25 17:18:43 -07:00
Simon Willison
b49fa446d6
--cors Access-Control-Max-Age: 3600, closes #2079
2023-05-25 15:05:58 -07:00
Simon Willison
9584879534
Rename callable.py to check_callable.py, refs #2078
2023-05-25 11:49:40 -07:00
Simon Willison
2e43a14da1
datasette.utils.check_callable(obj) - refs #2078
2023-05-25 11:35:34 -07:00