Simon Willison
db796771e2
Example links for API explorer, closes #1871
2022-11-13 20:58:45 -08:00
Simon Willison
c603faac5b
API explorer: persist form state in # in URL, refs #1871
2022-11-13 20:12:36 -08:00
Simon Willison
ca66ea57d2
GET and POST areas toggle each other, refs #1871
2022-11-13 13:12:51 -08:00
Simon Willison
51d60d7ddf
details-menu class to avoid accidential details closure
...
Refs https://github.com/simonw/datasette/issues/1871#issuecomment-1312821031
2022-11-13 13:06:58 -08:00
Simon Willison
f832435b88
Release 0.63.1
...
Refs ##1843, #1876 , #1883
2022-11-12 12:29:59 -08:00
Simon Willison
fa9cc9efaf
Fix for redirects ignoring base_url, refs #1883
2022-11-12 12:29:59 -08:00
Simon Willison
bcc781f4c5
Implementation and tests for _r field on actor, refs #1855
...
New mechanism for restricting permissions further for a given actor.
This still needs documentation. It will eventually be used by the mechanism to issue
signed API tokens that are only able to perform a subset of actions.
This also adds tests that exercise the POST /-/permissions tool, refs #1881
2022-11-03 17:12:23 -07:00
Simon Willison
fb8b6b2311
Refactor _error helper function
2022-11-03 16:36:43 -07:00
Simon Willison
2355067ef5
Tests now close SQLite database connections and files explicitly, refs #1843
...
Also added a db.close() method to the Database class.
2022-11-03 13:36:11 -07:00
Simon Willison
bb030ba46f
More margin on /-/allow-debug page
2022-11-02 22:10:59 -07:00
Simon Willison
c51d9246b9
Permission check testing tool, refs #1881
2022-11-02 22:10:07 -07:00
Simon Willison
9b5a73ba4c
Applied Black
2022-11-02 21:46:05 -07:00
Simon Willison
719e757252
Return method not allowed error in JSON in some situations
...
Added this while playing with the new API explorer, refs #1871
2022-11-02 20:12:13 -07:00
Simon Willison
000eeb4464
Link to Datasette API docs from /-/api, refs #1871
2022-11-01 22:45:05 -07:00
Simon Willison
042881a522
Ran Prettier, refs #1871
2022-11-01 22:30:16 -07:00
Simon Willison
0b166befc0
API explorer can now do GET, has JSON syntax highlighting
...
Refs #1871
2022-11-01 17:31:22 -07:00
Simon Willison
497290beaf
Handle database errors in /-/insert, refs #1866 , #1873
...
Also improved API explorer to show HTTP status of response, refs #1871
2022-11-01 12:59:17 -07:00
Simon Willison
9bec7c38eb
ignore and replace options for bulk inserts, refs #1873
...
Also removed the rule that you cannot include primary keys in the rows you insert.
And added validation that catches invalid parameters in the incoming JSON.
And renamed "inserted" to "rows" in the returned JSON for return_rows: true
2022-11-01 11:08:17 -07:00
Simon Willison
93a02281da
Show interrupted query in resizing textarea, closes #1876
2022-11-01 10:38:24 -07:00
Simon Willison
00632ded30
Initial attempt at /db/table/row/-/delete, refs #1864
2022-10-30 16:16:00 -07:00
Simon Willison
2865d3956f
/db/table/-/drop API, closes #1874
2022-10-30 15:17:21 -07:00
Simon Willison
fedbfcc368
Neater display of output and errors in API explorer, refs #1871
2022-10-30 14:49:07 -07:00
Simon Willison
9eb9ffae3d
Drop API token requirement from API explorer, refs #1871
2022-10-30 13:09:55 -07:00
Simon Willison
f6bf2d8045
Initial prototype of API explorer at /-/api, refs #1871
2022-10-29 23:20:11 -07:00
Simon Willison
c35859ae3d
API for bulk inserts, closes #1866
2022-10-29 23:03:45 -07:00
Simon Willison
61171f0154
Release 0.63
...
Refs #1646 , #1786 , #1787 , #1789 , #1794 , #1800 , #1804 , #1805 , #1808 , #1809 , #1816 , #1819 , #1825 , #1829 , #1831 , #1834 , #1844 , #1853 , #1860
Closes #1869
2022-10-27 17:58:41 -07:00
Forest Gregg
2ea60e12d9
Make hash and size a lazy property ( #1837 )
...
* use inspect data for hash and file size
* make hash and cached_size lazy properties
* move hash property near size
2022-10-27 17:58:41 -07:00
Simon Willison
6e788b49ed
New URL design /db/table/-/insert, refs #1851
2022-10-27 13:18:05 -07:00
Simon Willison
a51608090b
Slight tweak to insert row API design, refs #1851
...
https://github.com/simonw/datasette/issues/1851#issuecomment-1292997608
2022-10-27 12:06:18 -07:00
Simon Willison
b597bb6b3e
Better comment handling in SQL regex, refs #1860
2022-10-27 11:52:06 -07:00
Simon Willison
51c436fed2
First draft of insert row write API, refs #1851
2022-10-26 20:57:02 -07:00
Simon Willison
382a871583
max_signed_tokens_ttl setting, closes #1858
...
Also redesigned token format to include creation time and optional duration.
2022-10-26 20:14:59 -07:00
Simon Willison
af5d5d0243
Allow leading comments on SQL queries, refs #1860
2022-10-26 20:14:59 -07:00
Simon Willison
55f860c304
Fix bug with breadcrumbs and request=None, closes #1849
2022-10-26 20:14:59 -07:00
Simon Willison
c7956eed77
datasette create-token command, refs #1859
2022-10-25 21:26:12 -07:00
Simon Willison
c23fa850e7
allow_signed_tokens setting, closes #1856
2022-10-25 19:55:47 -07:00
Simon Willison
0f013ff497
Mechanism to prevent tokens creating tokens, closes #1857
2022-10-25 19:43:55 -07:00
Simon Willison
b29e487bc3
actor_from_request for dstok_ tokens, refs #1852
2022-10-25 19:18:41 -07:00
Simon Willison
7ab091e8ef
Tests and docs for /-/create-token, refs #1852
2022-10-25 19:04:05 -07:00
Simon Willison
68ccb7578b
dstoke_ prefix for tokens
...
Refs https://github.com/simonw/datasette/issues/1852#issuecomment-1291290451
2022-10-25 18:40:07 -07:00
Simon Willison
42f8b402e6
Initial prototype of create API token page, refs #1852
2022-10-25 17:07:58 -07:00
Simon Willison
02ae1a0029
Upgrade Docker images to Python 3.11, closes #1853
2022-10-25 12:04:25 -07:00
Simon Willison
602c0888ce
Release 0.63a1
...
Refs #1646 , #1819 , #1825 , #1829 , #1831 , #1832 , #1834 , #1844 , #1848
2022-10-23 20:07:09 -07: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
1a5e5f2aa9
Refactor breadcrumbs to respect permissions, refs #1831
2022-10-13 14:42:52 -07:00
Simon Willison
b7fec7f902
.sqlite/.sqlite3 extensions for config directory mode
...
Closes #1646
2022-10-07 16:03:30 -07:00
Forest Gregg
eff112498e
Useuse inspect data for hash and file size on startup
...
Thanks, @fgregg
Closes #1834
2022-10-06 13:06:06 -07:00
Simon Willison
883e326dd6
Drop word-wrap: anywhere, refs #1828 , #1805
2022-10-02 14:26:16 -07:00
Simon Willison
5f9f567acb
Show SQL query when reporting time limit error, closes #1819
2022-09-26 16:06:01 -07:00